{"id":"1745bc3f-6a92-4b1f-a999-030b9d724d80","entityType":"agent","slug":"clawhub-linkfox-ai-linkfox-amazon-store-orders","name":"亚马逊-店铺订单","canonicalUrl":"https://www.xpersona.co/agent/clawhub-linkfox-ai-linkfox-amazon-store-orders","canonicalPath":"/agent/clawhub-linkfox-ai-linkfox-amazon-store-orders","generatedAt":"2026-10-10T10:43:29.668Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-10T08:50:04.550Z","emptyReason":null},"description":"亚马逊卖家订单查询与履约状态管理。用于搜索订单、获取订单详情、订单商品、买家信息和收货地址，处理发货确认、配送状态、管制商品订单及买家核验状态。用户提到亚马逊订单、卖家订单列表、订单详情、Amazon order ID、买家信息、收货地址、订单行、确认发货、更新 shipment 状态、管制订单、核验状态、searchOrders、getOrder、Orders API 时触发。即使未明确说“Orders API”，只要希望查询或处理亚马逊商城中产生的卖家订单，也应触发此技能；MCF、FBA 入仓和 External Fulfillment 货件使用对应履约技能。 Skill: 亚马逊-店铺订单 Owner: linkfox-ai Summary: 亚马逊卖家订单查询与履约状态管理。用于搜索订单、获取订单详情、订单商品、买家信息和收货地址，处理发货确认、配送状态、管制商品订单及买家核验状态。用户提到亚马逊订单、卖家订单列表、订单详情、Amazon order ID、买家信息、收货地址、订单行、确认发货、更新 shipment 状态、管制订单、核验状态、searchOrders、getOrder、Orders API 时触发。即使未明确说“Orders API”，只要希望查询或处理亚马逊商城中产生的卖家订单，也应触发此技能；MCF、FBA 入仓和 External Fulfillment 货件使用对应履约技能。 Tags: latest:1.0.8 Version history: v1.0.8 | 2026-09-14T04:58:06.568Z | user Update from 1.","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.5K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-amazon-store-orders","sourceUrl":"https://clawhub.ai/linkfox-ai/linkfox-amazon-store-orders","homepage":"https://clawhub.ai/linkfox-ai/skills/linkfox-amazon-store-orders","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/linkfox-ai/linkfox-amazon-store-orders","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/linkfox-ai/skills/linkfox-amazon-store-orders","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":64,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"亚马逊卖家订单查询与履约状态管理。用于搜索订单、获取订单详情、订单商品、买家信息和收货地址，处理发货确认、配送状态、管制商品订单及买家核验状态。用户提到亚马逊订单、卖家订单列表、订单详情、Amazon order ID、买家信息、收货地址、订单行、确认发货、更新 shipment 状态、管制订单、核验状态、search"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T08:50:04.550Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T08:50:04.550Z","emptyReason":null},"stars":null,"forks":null,"downloads":1547,"packageName":null,"latestVersion":"1.0.8","tractionLabel":"1.5K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T08:50:04.550Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T08:50:04.550Z","lastCrawledAt":"2026-10-10T08:50:04.550Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T08:50:04.550Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.8","createdAt":"2026-09-14T04:58:06.568Z","changelog":"Update from 1.0.7 to 1.0.8","fileCount":18,"zipByteSize":37186},{"version":"1.0.7","createdAt":"2026-08-14T14:47:40.069Z","changelog":"Update from 1.0.6 to 1.0.7","fileCount":18,"zipByteSize":35931},{"version":"1.0.6","createdAt":"2026-08-07T10:44:44.896Z","changelog":"Update from 1.0.5 to 1.0.6","fileCount":18,"zipByteSize":36181},{"version":"1.0.5","createdAt":"2026-07-13T12:05:20.399Z","changelog":"Update from 1.0.4 to 1.0.5","fileCount":16,"zipByteSize":27674},{"version":"1.0.4","createdAt":"2026-07-06T11:13:47.596Z","changelog":"Update from 1.0.3 to 1.0.4","fileCount":16,"zipByteSize":27015},{"version":"1.0.3","createdAt":"2026-07-03T08:12:13.528Z","changelog":"Update from 1.0.2 to 1.0.3","fileCount":16,"zipByteSize":27098},{"version":"1.0.2","createdAt":"2026-07-03T04:37:20.320Z","changelog":"Update from 1.0.1 to 1.0.2","fileCount":15,"zipByteSize":25605},{"version":"1.0.1","createdAt":"2026-06-29T10:46:18.217Z","changelog":"Update from 0.0.1 to 1.0.1","fileCount":17,"zipByteSize":31070}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-amazon-store-orders","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-orders/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-orders/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-orders/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-orders/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-orders/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-orders/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T10:43:29.665Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-orders/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-orders/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-orders/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-amazon-store-orders/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-10T08:50:04.550Z","emptyReason":null},"readme":"Skill: 亚马逊-店铺订单\n\nOwner: linkfox-ai\n\nSummary: 亚马逊卖家订单查询与履约状态管理。用于搜索订单、获取订单详情、订单商品、买家信息和收货地址，处理发货确认、配送状态、管制商品订单及买家核验状态。用户提到亚马逊订单、卖家订单列表、订单详情、Amazon order ID、买家信息、收货地址、订单行、确认发货、更新 shipment 状态、管制订单、核验状态、searchOrders、getOrder、Orders API 时触发。即使未明确说“Orders API”，只要希望查询或处理亚马逊商城中产生的卖家订单，也应触发此技能；MCF、FBA 入仓和 External Fulfillment 货件使用对应履约技能。\n\nTags: latest:1.0.8\n\nVersion history:\n\nv1.0.8 | 2026-09-14T04:58:06.568Z | user\n\nUpdate from 1.0.7 to 1.0.8\n\nv1.0.7 | 2026-08-14T14:47:40.069Z | user\n\nUpdate from 1.0.6 to 1.0.7\n\nv1.0.6 | 2026-08-07T10:44:44.896Z | user\n\nUpdate from 1.0.5 to 1.0.6\n\nv1.0.5 | 2026-07-13T12:05:20.399Z | user\n\nUpdate from 1.0.4 to 1.0.5\n\nv1.0.4 | 2026-07-06T11:13:47.596Z | user\n\nUpdate from 1.0.3 to 1.0.4\n\nv1.0.3 | 2026-07-03T08:12:13.528Z | user\n\nUpdate from 1.0.2 to 1.0.3\n\nv1.0.2 | 2026-07-03T04:37:20.320Z | user\n\nUpdate from 1.0.1 to 1.0.2\n\nv1.0.1 | 2026-06-29T10:46:18.217Z | user\n\nUpdate from 0.0.1 to 1.0.1\n\nv0.0.1 | 2026-05-20T08:04:48.107Z | user\n\nInitial release\n\nArchive index:\n\nArchive v1.0.8: 18 files, 37186 bytes\n\nFiles: references/api.md (6430b), references/onboarding.md (1999b), scripts/_spapi_orders_common.py (10860b), scripts/check_auth_dependency.py (6077b), scripts/confirm_shipment.py (2119b), scripts/get_order_address.py (1695b), scripts/get_order_buyer_info.py (1717b), scripts/get_order_items_buyer_info.py (1911b), scripts/get_order_items.py (1841b), scripts/get_order_regulated_info.py (1681b), scripts/get_order.py (2489b), scripts/onboarding.py (24027b), scripts/search_orders.py (4328b), scripts/update_shipment_status.py (2944b), scripts/update_verification_status.py (2497b), skill-card.md (3578b), SKILL.md (10378b), _meta.json (146b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: linkfox-amazon-store-orders\ndescription: 亚马逊卖家订单查询与履约状态管理。用于搜索订单、获取订单详情、订单商品、买家信息和收货地址，处理发货确认、配送状态、管制商品订单及买家核验状态。用户提到亚马逊订单、卖家订单列表、订单详情、Amazon order ID、买家信息、收货地址、订单行、确认发货、更新 shipment 状态、管制订单、核验状态、searchOrders、getOrder、Orders API 时触发。即使未明确说“Orders API”，只要希望查询或处理亚马逊商城中产生的卖家订单，也应触发此技能；MCF、FBA 入仓和 External Fulfillment 货件使用对应履约技能。\n---\n\n# Amazon 店铺 Orders\n\n本 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`**。\n\n## 调用方式\n\n- **API 端点**：`POST /spApi/developerProxy`（不同 SP-API 操作通过 path/method 区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗算力；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-orders-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和算力问题\n发生以下异常情况时，采用 references/onboarding.md 引导解决问题：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示算力或余额不足**：消息含\"算力余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n## 官方参考索引\n\n| 能力 | 文档 |\n|------|------|\n| searchOrders | [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders) |\n| getOrder (v2026-01-01) | [getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3) |\n| getOrderBuyerInfo (deprecated) | [getOrderBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderbuyerinfo) |\n| getOrderAddress (deprecated) | [getOrderAddress](https://developer-docs.amazon.com/sp-api/reference/getorderaddress) |\n| getOrderItems (deprecated) | [getOrderItems](https://developer-docs.amazon.com/sp-api/reference/getorderitems) |\n| getOrderItemsBuyerInfo (deprecated) | [getOrderItemsBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderitemsbuyerinfo) |\n| updateShipmentStatus | [updateShipmentStatus](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus) |\n| getOrderRegulatedInfo | [getOrderRegulatedInfo](https://developer-docs.amazon.com/sp-api/reference/getorderregulatedinfo) |\n| updateVerificationStatus | [updateVerificationStatus](https://developer-docs.amazon.com/sp-api/reference/updateverificationstatus) |\n| confirmShipment | [confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment) |\n\n---\n\n## Prerequisites（必须先读）\n\n本 skill **依赖** **`linkfox-amazon-store-auth`**。\n\n1. 运行 `python scripts/check_auth_dependency.py`；若 exit code **42** 且 stderr 含 `DEPENDENCY_MISSING:`，请先安装 **`linkfox-amazon-store-auth`**。\n2. **不要**在本 skill 内绕过依赖实现授权或令牌逻辑。\n\n---\n\n## Current Capabilities（脚本一览）\n\n| 能力 | developerProxy `path`（要点） | 脚本 |\n|------|------------------------------|------|\n| searchOrders | `orders/2026-01-01/orders` + Query | `search_orders.py` |\n| getOrder | `orders/2026-01-01/orders/{orderId}` + Query | `get_order.py` |\n| getOrderBuyerInfo | `orders/v0/orders/{orderId}/buyerInfo` | `get_order_buyer_info.py` |\n| getOrderAddress | `orders/v0/orders/{orderId}/address` | `get_order_address.py` |\n| getOrderItems | `orders/v0/orders/{orderId}/orderItems` + NextToken | `get_order_items.py` |\n| getOrderItemsBuyerInfo | `orders/v0/orders/{orderId}/orderItems/buyerInfo` | `get_order_items_buyer_info.py` |\n| updateShipmentStatus | `orders/v0/orders/{orderId}/shipment`，POST JSON | `update_shipment_status.py` |\n| getOrderRegulatedInfo | `orders/v0/orders/{orderId}/regulatedInfo` | `get_order_regulated_info.py` |\n| updateVerificationStatus | `orders/v0/orders/{orderId}/regulatedInfo`，PATCH JSON | `update_verification_status.py` |\n| confirmShipment | `orders/v0/orders/{orderId}/shipmentConfirmation`，POST JSON | `confirm_shipment.py` |\n\n共享逻辑见 **`scripts/_spapi_orders_common.py`**（仅供同目录脚本 import，非独立 CLI）。\n\n---\n\n## Quick Parameters（摘要）\n\n- **searchOrders**：`createdAfter` **或** `lastUpdatedAfter`（二选一）；`marketplaceIds`；可选 `fulfillmentStatuses`、`fulfilledBy`、`maxResultsPerPage`、`paginationToken`（上一页 **`nextToken`**）、`includedData`。\n- **getOrder**：`orderId`；可选 **`includedData`**（如 BUYER、FULFILLMENT、PACKAGES）。\n- **getOrderItems / getOrderItemsBuyerInfo**：可选 **`nextToken`** → 查询参数 `NextToken`。\n- **updateShipmentStatus**：`marketplaceId`、`shipmentStatus`（ReadyForPickup / PickedUp / RefusedPickup）；可选 **`orderItems`**。\n- **updateVerificationStatus**：传 **`regulatedOrderVerificationStatus`** 对象，或整包 **`requestBody`**。\n- **confirmShipment**：**`requestBody`** 为官方要求的完整对象（通常含 **`packageDetail`** 等）。\n\n---\n\n## Scripts\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/search_orders.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"lastUpdatedAfter\":\"2026-05-01T00:00:00Z\"}'\n\npython scripts/get_order.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"orderId\":\"123-1234567-1234567\",\"includedData\":[\"FULFILLMENT\",\"PACKAGES\"]}'\n```\n\n---\n\n## Display Rules\n\n1. 先看网关 **`developerProxy.errcode` / `httpStatus`**，再解析各脚本附加字段（如 **`searchOrders`**、**`order`**）。\n2. **POST/PATCH** 脚本：`stdout` 中含 **`requestBody`**（组装后的 Amazon 请求体），便于排查。\n3. **v0 买家/地址/行项目** 接口在官方文档中为 **deprecated**；新集成优先用 **v2026-01-01** 的 **searchOrders / getOrder** 与 **`includedData`** 拉齐业务字段。\n4. **searchOrders** 默认速率较低（官方约 **0.0056 req/s**），注意 **429**。\n5. 受限 PII / RDT 以 Amazon 数据保护政策为准；详见 **`references/api.md`**。\n\n---\n\n## Important Limitations\n\n- 权限：**Orders** 及相关角色；部分读取可能需 **Restricted Data Token**，不在本 skill 内实现。\n- **路径白名单**：若网关返回 **1005** 等拒绝转发，需后端放行 **`orders/v0/...`** 与 **`orders/2026-01-01/...`** 前缀。\n- 返回结构以 Amazon schema 为准；详见 **`references/api.md`**。\n\n## Amazon SP-API 接口保护与重试指引\n\n同一店铺连续收到 Amazon SP-API 的 400、403、404 或 429 时，网关会返回 450、453、454 或 459 并短暂冷却。这些自定义状态码不是 Amazon 原生状态，也不表示封号；目的是避免持续异常或高频调用扩大店铺风险。\n\n| 状态与 message | 范围 | 触发与冷却 | 处理 |\n|---|---|---|---|\n| `450`：`400，请求异常，请优化您的参数` | 店铺+接口 | 60 秒内超过 3 次：5 分钟；10 分钟内超过 4 次：20 分钟 | 停止原参数重试，检查必填字段、marketplace、ID、日期和请求体 |\n| `453`：`403，店铺未授权，请先授权` | 店铺全部接口 | 60 秒内超过 2 次：5 分钟；10 分钟内超过 4 次：30 分钟 | 停止该店铺调用，检查授权、权限、店铺归属和区域 |\n| `454`：`404，资源不存在，请优化您的参数` | 店铺+接口 | 60 秒内超过 3 次：5 分钟；10 分钟内超过 4 次：30 分钟 | 确认资源 ID、所属店铺/站点、资源状态和接口路径 |\n| `459`：`429限流中，请降低频率` | 店铺+接口 | 首次：15 秒；2 分钟内超过 2 次：30 秒；3 分钟内超过 4 次：2 分钟 | 降低并发、分页和轮询频率并逐级退避 |\n\n- 立即停止自动或并发重试，不得通过换脚本或重复创建任务绕过保护；优先遵循 `retryAfter`、`blockedUntil`，没有时按表中时长说明。\n- 450/453/454 必须先修正参数、授权或资源标识，冷却后最多谨慎重试一次；再次触发则停止调用。453 期间停止该店铺全部 SP-API。\n- 保留已有 `reportId`、`feedId` 等任务 ID；写操作结果不确定时先查询状态，不直接重放。\n- 向用户先说明店铺保护，再给原因、处理和等待时间。可回复：“为保护您的亚马逊店铺安全，检测到 Amazon SP-API 连续返回{原因}，当前已进入短暂保护。请先{处理动作}，预计{等待时间}后再试；这不代表封号，也不是套餐或算力限制。”不要只说“LinkFox 限流”或“服务器繁忙”。\n\n## 算力消耗规则\n\n不消耗算力。\n\n**Feedback：** 见 `references/api.md`，`skillName`：`linkfox-amazon-store-orders`。\n\n---\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-orders\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1789361886568\n}\n\nFile v1.0.8:references/api.md\n\n# linkfox-amazon-store-orders — API 与网关调用说明\n\n## 1. 调用链\n\n1. **`POST ${LINKFOX_TOOL_GATEWAY}/spApi/storeTokens`**  \n   Body: `{\"sellerId\":\"<卖家ID>\",\"region\":\"NA|EU|FE|...\"}`  \n   响应需含 **`accessToken`**。\n\n2. **`POST ${LINKFOX_TOOL_GATEWAY}/spApi/developerProxy`**  \n   Body 字段（与 listings / pricing 系列一致）：\n   - **`region`**：与 storeTokens 相同。\n   - **`path`**：Amazon SP-API 相对 path，**无**前导 `/`。\n   - **`method`**：`GET` | `POST` | `PATCH`。\n   - **`amzAccessToken`**：上一步的 access token。\n   - **`queryString`**（可选）：URL 查询串，不含 `?`。\n   - **`body`**（POST/PATCH）：JSON 字符串。\n   - **`contentType`**：如 `application/json`。\n\n环境变量：\n\n- **`LINKFOX_AGENT_API_KEY`**（或 **`LINKFOXAGENT_API_KEY`**，必填）：网关鉴权。（如未配置 按 SKILL.md 的 **## 解决认证和算力问题** 处理）\n- **`LINKFOX_TOOL_GATEWAY`**（或 `STORE_API_BASE_URL` / `SPAPI_BASE_URL`，可选）：默认 `https://tool-gateway.linkfox.com`。\n\n---\n\n## 2. 脚本与 path / method 对照\n\n| 脚本 | method | path 模板 |\n|------|--------|-----------|\n| `search_orders.py` | GET | `orders/2026-01-01/orders` |\n| `get_order.py` | GET | `orders/2026-01-01/orders/{orderId}` |\n| `get_order_buyer_info.py` | GET | `orders/v0/orders/{orderId}/buyerInfo` |\n| `get_order_address.py` | GET | `orders/v0/orders/{orderId}/address` |\n| `get_order_items.py` | GET | `orders/v0/orders/{orderId}/orderItems` |\n| `get_order_items_buyer_info.py` | GET | `orders/v0/orders/{orderId}/orderItems/buyerInfo` |\n| `update_shipment_status.py` | POST | `orders/v0/orders/{orderId}/shipment` |\n| `get_order_regulated_info.py` | GET | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `update_verification_status.py` | PATCH | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `confirm_shipment.py` | POST | `orders/v0/orders/{orderId}/shipmentConfirmation` |\n\n`orderId` 在 path 中经 **percent-encoding**（与 listings SKU 处理一致）。\n\n---\n\n## 3. 各脚本 JSON 入参\n\n### 3.1 公共字段\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| sellerId | string | 是 | 卖家 ID |\n| region | string | 是 | NA / EU / FE 等与 auth 一致 |\n| skipDepCheck | boolean | 否 | 为 true 时跳过本地依赖探测 |\n\n### 3.2 `search_orders.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| marketplaceIds | string[] | 是 | 站点 ID 列表，长度 ≤ 50（以 Amazon 为准） |\n| createdAfter | string | 条件 | ISO 8601；与 `lastUpdatedAfter` **二选一** |\n| createdBefore | string | 否 | 与 `createdAfter` 同组使用 |\n| lastUpdatedAfter | string | 条件 | ISO 8601；与 `createdAfter` **二选一** |\n| lastUpdatedBefore | string | 否 | 与 `lastUpdatedAfter` 同组使用 |\n| fulfillmentStatuses | string[] | 否 | 如 PENDING、UNSHIPPED、SHIPPED、CANCELLED 等 |\n| fulfilledBy | string[] | 否 | MERCHANT、AMAZON |\n| maxResultsPerPage | number | 否 | 1～100，默认 100 |\n| paginationToken | string | 否 | 上一页响应 **`nextToken`** |\n| includedData | string[] | 否 | BUYER、RECIPIENT、PROCEEDS、FULFILLMENT、PACKAGES 等（见 [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders)） |\n\n脚本会在 stdout 的 JSON 中解析 **`searchOrders`**（当 `developerProxy.errcode==200` 且 `httpStatus==200` 时由 `body` JSON 解析）。\n\n### 3.3 `get_order.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | 亚马逊订单号 |\n| includedData | string[] | 否 | 同官方 `includedData` |\n\n解析字段：**`order`**。\n\n### 3.4 `get_order_buyer_info.py` / `get_order_address.py`\n\n| 字段 | 类型 | 必填 |\n|------|------|------|\n| orderId | string | 是 |\n\n解析字段：**`buyerInfo`** / **`shippingAddress`**（以实际 JSON 为准）。\n\n### 3.5 `get_order_items.py` / `get_order_items_buyer_info.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| nextToken | string | 否 | 映射为查询参数 **`NextToken`** |\n\n解析字段：**`orderItems`** / **`orderItemsBuyerInfo`**。\n\n### 3.6 `update_shipment_status.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| marketplaceId | string | 是 | |\n| shipmentStatus | string | 是 | ReadyForPickup、PickedUp、RefusedPickup |\n| orderItems | object[] | 否 | 部分更新时的行项目 |\n\n成功时 Amazon 常返回 **HTTP 204**，stdout 中 **`developerProxy`** 含状态即可，未必有 JSON body。\n\n### 3.7 `get_order_regulated_info.py`\n\n仅需 **`orderId`**。解析字段：**`regulatedOrder`**。\n\n### 3.8 `update_verification_status.py`\n\n| 方式 | 说明 |\n|------|------|\n| `regulatedOrderVerificationStatus` | 对象，脚本包装为 `{ \"regulatedOrderVerificationStatus\": ... }` |\n| `requestBody` | 整包 PATCH body 对象 |\n\n成功可能为 **204**。\n\n### 3.9 `confirm_shipment.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| requestBody | object | 是 | 与官方 **confirmShipment** schema 一致 |\n\n成功可能为 **204**。\n\n---\n\n## 4. 响应与错误\n\n- 脚本统一输出 JSON：`developerProxy` 为网关原样；部分脚本增加 **`resolvedPath`**、**`queryString`**、**`requestBody`**。\n- 优先阅读 **`developerProxy.errcode`**、**`developerProxy.httpStatus`**，再读 **`developerProxy.body`**（常为 Amazon 错误 JSON）。\n- **429**：需降频重试；searchOrders 默认速率较低。\n- HTTP 401 或 authorized error：按 SKILL.md 的 **## 解决认证和算力问题** 处理。\n- HTTP 402：按 SKILL.md 的 **## 解决认证和算力问题** 处理。\n\n---\n\n## 5. 受限数据与 deprecated\n\n- **getOrderBuyerInfo / getOrderAddress / getOrderItems / getOrderItemsBuyerInfo** 在官方文档中标记为 **deprecated**；敏感数据需 **RDT** 与数据保护策略，见 [Tokens API](https://developer-docs.amazon.com/sp-api/reference/createrestricteddatatoken) 与 Orders 文档说明。\n- **getOrderRegulatedInfo** 的 `Accept` 等头若需特化，取决于网关是否支持透传；当前脚本未附加额外 Amazon 请求头。\n\n---\n\n## 6. Feedback\n\n若需反馈本 skill 问题，请在工单或内部渠道注明 **`skillName`: `linkfox-amazon-store-orders`**，并附上 `developerProxy` 完整 JSON（注意脱敏）。\n\nFile v1.0.8:references/onboarding.md\n\n# 解决认证和算力问题\n\n调用本 skill 时若网关返回 **auth** 或 **billing** 错误，走本 skill 自带的 `scripts/onboarding.py` 完成引导。\n\n**auth 场景**：`errcode=401` 或消息含 `authorized error`/`鉴权失败`/`未授权`/`unauthorized`；或 `LINKFOX_AGENT_API_KEY` 与 `LINKFOXAGENT_API_KEY` 均为空。\n1. 若已配置 key → 先让用户重启会话（最常见误判），仍失败让用户重新取 key 或换手机号重注册\n2. 未配置 → 询问：自助去 https://agent.linkfox.com/ 取 key，或提供手机号让脚本注册\n3. 手机号路径：\n   - `python scripts/onboarding.py send-code <phone>` → 展示 JSON 里的 phone/agreements\n   - 收到验证码后：`python scripts/onboarding.py login <phone> <code>`\n   - 拿到 `api_key` 后把下面三平台配置转发给用户，提示重启会话生效：\n     - Windows PowerShell（永久）：`setx LINKFOX_AGENT_API_KEY \"<key>\"`\n     - macOS zsh：`echo 'export LINKFOX_AGENT_API_KEY=\"<key>\"' >> ~/.zshrc && source ~/.zshrc`\n     - Linux bash：`echo 'export LINKFOX_AGENT_API_KEY=\"<key>\"' >> ~/.bashrc && source ~/.bashrc`\n     - 变量名 `LINKFOX_AGENT_API_KEY`（主推）或 `LINKFOXAGENT_API_KEY`（老规范）任一即可\n\n**billing 场景**：`errcode=402` 或消息含 `算力/余额/quota/insufficient/充值/套餐到期`。\n- `python scripts/onboarding.py list-plans` → 有 AskUserQuestion 就弹菜单，否则输出编号清单让用户选\n- 校验 `plan_id` ∈ 清单、支付方式 ∈ 该套餐 `available_methods`（通常 `wechat/alipay`）\n- `python scripts/onboarding.py order <plan_id> <method>` → 展示优先级 PNG > `pay_url` > `ascii_qr`（标注兜底）\n- 已付款可选调 `python scripts/onboarding.py query <order_id>`，不主动轮询\n\n排除 `errcode=403`（无权限，不归入这两类）。所有子命令输出 stdout JSON，`error` 字段已含阶段前缀，透传给用户即可。完整用法：`python scripts/onboarding.py --help`。\n\nFile v1.0.8:skill-card.md\n\n## Description:\n\nHelps agents search Amazon seller orders, retrieve order details, buyer and shipping information, order items, regulated-order information, and manage shipment or verification status through LinkFox-managed Amazon SP-API calls.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[linkfox-ai](https://clawhub.ai/user/linkfox-ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal Amazon sellers, operators, and support agents use this skill to query seller order data, inspect buyer or fulfillment details, and perform supported shipment, verification, or regulated-order workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill handles Amazon seller order data, buyer information, shipping addresses, and regulated-order information.\n\nMitigation: Install only when the LinkFox gateway is trusted, treat saved output files and logs as sensitive, and require explicit user confirmation before retrieving PII.\n\nRisk: The onboarding flow can handle API keys, phone login codes, payment QR data, and order or billing status.\n\nMitigation: Use secure secret storage for API keys, avoid persisting secrets in shared shell profiles, and require explicit confirmation before creating paid orders.\n\nRisk: Configurable gateway environment variables can direct credential-bearing requests to alternate endpoints.\n\nMitigation: Prefer the default LinkFox gateway and review any custom gateway environment variable before use.\n\nRisk: Repeated failed or high-frequency Amazon SP-API requests can trigger store-level protective cooldowns.\n\nMitigation: Stop automatic retries on repeated 400, 403, 404, or 429 responses, correct parameters or authorization first, and observe retryAfter or blockedUntil values.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/linkfox-ai/skills/linkfox-amazon-store-orders)\n- [API and gateway calling guide](references/api.md)\n- [Authentication and billing onboarding](references/onboarding.md)\n- [Amazon SP-API searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders)\n- [Amazon SP-API getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3)\n- [Amazon SP-API getOrderItems](https://developer-docs.amazon.com/sp-api/reference/getorderitems)\n- [Amazon SP-API updateShipmentStatus](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus)\n- [Amazon SP-API getOrderRegulatedInfo](https://developer-docs.amazon.com/sp-api/reference/getorderregulatedinfo)\n- [Amazon SP-API updateVerificationStatus](https://developer-docs.amazon.com/sp-api/reference/updateverificationstatus)\n- [Amazon SP-API confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment)\n- [Amazon SP-API createRestrictedDataToken](https://developer-docs.amazon.com/sp-api/reference/createrestricteddatatoken)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, API Calls, Files, Configuration]\n\n**Output Format:** [Markdown guidance with Python shell commands and JSON response files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Scripts save full JSON responses under ./linkfox/<YYYY-MM-DD>/<session>/data and may print summaries for responses over 8 KB.]\n\n## Skill Version(s):\n\n1.0.8 (source: release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.7: 18 files, 35931 bytes\n\nFiles: references/api.md (6430b), references/onboarding.md (2046b), scripts/_spapi_orders_common.py (10630b), scripts/check_auth_dependency.py (6077b), scripts/confirm_shipment.py (2119b), scripts/get_order_address.py (1695b), scripts/get_order_buyer_info.py (1717b), scripts/get_order_items_buyer_info.py (1911b), scripts/get_order_items.py (1841b), scripts/get_order_regulated_info.py (1681b), scripts/get_order.py (2489b), scripts/onboarding.py (24089b), scripts/search_orders.py (4328b), scripts/update_shipment_status.py (2944b), scripts/update_verification_status.py (2497b), skill-card.md (3046b), SKILL.md (8190b), _meta.json (146b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: linkfox-amazon-store-orders\ndescription: 亚马逊店铺订单（与 linkfox-amazon-store-auth / report / listings / pricing 同系列），经 /spApi/developerProxy 调用 SP-API Orders：v2026-01-01 的 searchOrders、getOrder；v0 的 getOrderBuyerInfo、getOrderAddress、getOrderItems、getOrderItemsBuyerInfo、updateShipmentStatus、getOrderRegulatedInfo、updateVerificationStatus、confirmShipment。当用户提到亚马逊订单、searchOrders、getOrder、订单列表、订单详情、买家信息、收货地址、订单行、发货确认、管制订单、核验状态、Orders API、SP-API 订单 时触发。\n---\n\n# Amazon 店铺 Orders\n\n本 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`**。\n\n## 调用方式\n\n- **API 端点**：`POST /spApi/developerProxy`（不同 SP-API 操作通过 path/method 区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-orders-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和积分问题\n发生以下异常情况时，采用 references/onboarding.md 引导解决问题：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示积分或余额不足**：消息含\"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n## 官方参考索引\n\n| 能力 | 文档 |\n|------|------|\n| searchOrders | [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders) |\n| getOrder (v2026-01-01) | [getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3) |\n| getOrderBuyerInfo (deprecated) | [getOrderBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderbuyerinfo) |\n| getOrderAddress (deprecated) | [getOrderAddress](https://developer-docs.amazon.com/sp-api/reference/getorderaddress) |\n| getOrderItems (deprecated) | [getOrderItems](https://developer-docs.amazon.com/sp-api/reference/getorderitems) |\n| getOrderItemsBuyerInfo (deprecated) | [getOrderItemsBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderitemsbuyerinfo) |\n| updateShipmentStatus | [updateShipmentStatus](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus) |\n| getOrderRegulatedInfo | [getOrderRegulatedInfo](https://developer-docs.amazon.com/sp-api/reference/getorderregulatedinfo) |\n| updateVerificationStatus | [updateVerificationStatus](https://developer-docs.amazon.com/sp-api/reference/updateverificationstatus) |\n| confirmShipment | [confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment) |\n\n---\n\n## Prerequisites（必须先读）\n\n本 skill **依赖** **`linkfox-amazon-store-auth`**。\n\n1. 运行 `python scripts/check_auth_dependency.py`；若 exit code **42** 且 stderr 含 `DEPENDENCY_MISSING:`，请先安装 **`linkfox-amazon-store-auth`**。\n2. **不要**在本 skill 内绕过依赖实现授权或令牌逻辑。\n\n---\n\n## Current Capabilities（脚本一览）\n\n| 能力 | developerProxy `path`（要点） | 脚本 |\n|------|------------------------------|------|\n| searchOrders | `orders/2026-01-01/orders` + Query | `search_orders.py` |\n| getOrder | `orders/2026-01-01/orders/{orderId}` + Query | `get_order.py` |\n| getOrderBuyerInfo | `orders/v0/orders/{orderId}/buyerInfo` | `get_order_buyer_info.py` |\n| getOrderAddress | `orders/v0/orders/{orderId}/address` | `get_order_address.py` |\n| getOrderItems | `orders/v0/orders/{orderId}/orderItems` + NextToken | `get_order_items.py` |\n| getOrderItemsBuyerInfo | `orders/v0/orders/{orderId}/orderItems/buyerInfo` | `get_order_items_buyer_info.py` |\n| updateShipmentStatus | `orders/v0/orders/{orderId}/shipment`，POST JSON | `update_shipment_status.py` |\n| getOrderRegulatedInfo | `orders/v0/orders/{orderId}/regulatedInfo` | `get_order_regulated_info.py` |\n| updateVerificationStatus | `orders/v0/orders/{orderId}/regulatedInfo`，PATCH JSON | `update_verification_status.py` |\n| confirmShipment | `orders/v0/orders/{orderId}/shipmentConfirmation`，POST JSON | `confirm_shipment.py` |\n\n共享逻辑见 **`scripts/_spapi_orders_common.py`**（仅供同目录脚本 import，非独立 CLI）。\n\n---\n\n## Quick Parameters（摘要）\n\n- **searchOrders**：`createdAfter` **或** `lastUpdatedAfter`（二选一）；`marketplaceIds`；可选 `fulfillmentStatuses`、`fulfilledBy`、`maxResultsPerPage`、`paginationToken`（上一页 **`nextToken`**）、`includedData`。\n- **getOrder**：`orderId`；可选 **`includedData`**（如 BUYER、FULFILLMENT、PACKAGES）。\n- **getOrderItems / getOrderItemsBuyerInfo**：可选 **`nextToken`** → 查询参数 `NextToken`。\n- **updateShipmentStatus**：`marketplaceId`、`shipmentStatus`（ReadyForPickup / PickedUp / RefusedPickup）；可选 **`orderItems`**。\n- **updateVerificationStatus**：传 **`regulatedOrderVerificationStatus`** 对象，或整包 **`requestBody`**。\n- **confirmShipment**：**`requestBody`** 为官方要求的完整对象（通常含 **`packageDetail`** 等）。\n\n---\n\n## Scripts\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/search_orders.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"lastUpdatedAfter\":\"2026-05-01T00:00:00Z\"}'\n\npython scripts/get_order.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"orderId\":\"123-1234567-1234567\",\"includedData\":[\"FULFILLMENT\",\"PACKAGES\"]}'\n```\n\n---\n\n## Display Rules\n\n1. 先看网关 **`developerProxy.errcode` / `httpStatus`**，再解析各脚本附加字段（如 **`searchOrders`**、**`order`**）。\n2. **POST/PATCH** 脚本：`stdout` 中含 **`requestBody`**（组装后的 Amazon 请求体），便于排查。\n3. **v0 买家/地址/行项目** 接口在官方文档中为 **deprecated**；新集成优先用 **v2026-01-01** 的 **searchOrders / getOrder** 与 **`includedData`** 拉齐业务字段。\n4. **searchOrders** 默认速率较低（官方约 **0.0056 req/s**），注意 **429**。\n5. 受限 PII / RDT 以 Amazon 数据保护政策为准；详见 **`references/api.md`**。\n\n---\n\n## Important Limitations\n\n- 权限：**Orders** 及相关角色；部分读取可能需 **Restricted Data Token**，不在本 skill 内实现。\n- **路径白名单**：若网关返回 **1005** 等拒绝转发，需后端放行 **`orders/v0/...`** 与 **`orders/2026-01-01/...`** 前缀。\n- 返回结构以 Amazon schema 为准；详见 **`references/api.md`**。\n\n## 积分消耗规则\n\n不消耗积分。\n\n**Feedback：** 见 `references/api.md`，`skillName`：`linkfox-amazon-store-orders`。\n\n---\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-orders\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1786718860069\n}\n\nFile v1.0.7:references/api.md\n\n# linkfox-amazon-store-orders — API 与网关调用说明\n\n## 1. 调用链\n\n1. **`POST ${LINKFOX_TOOL_GATEWAY}/spApi/storeTokens`**  \n   Body: `{\"sellerId\":\"<卖家ID>\",\"region\":\"NA|EU|FE|...\"}`  \n   响应需含 **`accessToken`**。\n\n2. **`POST ${LINKFOX_TOOL_GATEWAY}/spApi/developerProxy`**  \n   Body 字段（与 listings / pricing 系列一致）：\n   - **`region`**：与 storeTokens 相同。\n   - **`path`**：Amazon SP-API 相对 path，**无**前导 `/`。\n   - **`method`**：`GET` | `POST` | `PATCH`。\n   - **`amzAccessToken`**：上一步的 access token。\n   - **`queryString`**（可选）：URL 查询串，不含 `?`。\n   - **`body`**（POST/PATCH）：JSON 字符串。\n   - **`contentType`**：如 `application/json`。\n\n环境变量：\n\n- **`LINKFOX_AGENT_API_KEY`**（或 **`LINKFOXAGENT_API_KEY`**，必填）：网关鉴权。（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理）\n- **`LINKFOX_TOOL_GATEWAY`**（或 `STORE_API_BASE_URL` / `SPAPI_BASE_URL`，可选）：默认 `https://tool-gateway.linkfox.com`。\n\n---\n\n## 2. 脚本与 path / method 对照\n\n| 脚本 | method | path 模板 |\n|------|--------|-----------|\n| `search_orders.py` | GET | `orders/2026-01-01/orders` |\n| `get_order.py` | GET | `orders/2026-01-01/orders/{orderId}` |\n| `get_order_buyer_info.py` | GET | `orders/v0/orders/{orderId}/buyerInfo` |\n| `get_order_address.py` | GET | `orders/v0/orders/{orderId}/address` |\n| `get_order_items.py` | GET | `orders/v0/orders/{orderId}/orderItems` |\n| `get_order_items_buyer_info.py` | GET | `orders/v0/orders/{orderId}/orderItems/buyerInfo` |\n| `update_shipment_status.py` | POST | `orders/v0/orders/{orderId}/shipment` |\n| `get_order_regulated_info.py` | GET | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `update_verification_status.py` | PATCH | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `confirm_shipment.py` | POST | `orders/v0/orders/{orderId}/shipmentConfirmation` |\n\n`orderId` 在 path 中经 **percent-encoding**（与 listings SKU 处理一致）。\n\n---\n\n## 3. 各脚本 JSON 入参\n\n### 3.1 公共字段\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| sellerId | string | 是 | 卖家 ID |\n| region | string | 是 | NA / EU / FE 等与 auth 一致 |\n| skipDepCheck | boolean | 否 | 为 true 时跳过本地依赖探测 |\n\n### 3.2 `search_orders.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| marketplaceIds | string[] | 是 | 站点 ID 列表，长度 ≤ 50（以 Amazon 为准） |\n| createdAfter | string | 条件 | ISO 8601；与 `lastUpdatedAfter` **二选一** |\n| createdBefore | string | 否 | 与 `createdAfter` 同组使用 |\n| lastUpdatedAfter | string | 条件 | ISO 8601；与 `createdAfter` **二选一** |\n| lastUpdatedBefore | string | 否 | 与 `lastUpdatedAfter` 同组使用 |\n| fulfillmentStatuses | string[] | 否 | 如 PENDING、UNSHIPPED、SHIPPED、CANCELLED 等 |\n| fulfilledBy | string[] | 否 | MERCHANT、AMAZON |\n| maxResultsPerPage | number | 否 | 1～100，默认 100 |\n| paginationToken | string | 否 | 上一页响应 **`nextToken`** |\n| includedData | string[] | 否 | BUYER、RECIPIENT、PROCEEDS、FULFILLMENT、PACKAGES 等（见 [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders)） |\n\n脚本会在 stdout 的 JSON 中解析 **`searchOrders`**（当 `developerProxy.errcode==200` 且 `httpStatus==200` 时由 `body` JSON 解析）。\n\n### 3.3 `get_order.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | 亚马逊订单号 |\n| includedData | string[] | 否 | 同官方 `includedData` |\n\n解析字段：**`order`**。\n\n### 3.4 `get_order_buyer_info.py` / `get_order_address.py`\n\n| 字段 | 类型 | 必填 |\n|------|------|------|\n| orderId | string | 是 |\n\n解析字段：**`buyerInfo`** / **`shippingAddress`**（以实际 JSON 为准）。\n\n### 3.5 `get_order_items.py` / `get_order_items_buyer_info.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| nextToken | string | 否 | 映射为查询参数 **`NextToken`** |\n\n解析字段：**`orderItems`** / **`orderItemsBuyerInfo`**。\n\n### 3.6 `update_shipment_status.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| marketplaceId | string | 是 | |\n| shipmentStatus | string | 是 | ReadyForPickup、PickedUp、RefusedPickup |\n| orderItems | object[] | 否 | 部分更新时的行项目 |\n\n成功时 Amazon 常返回 **HTTP 204**，stdout 中 **`developerProxy`** 含状态即可，未必有 JSON body。\n\n### 3.7 `get_order_regulated_info.py`\n\n仅需 **`orderId`**。解析字段：**`regulatedOrder`**。\n\n### 3.8 `update_verification_status.py`\n\n| 方式 | 说明 |\n|------|------|\n| `regulatedOrderVerificationStatus` | 对象，脚本包装为 `{ \"regulatedOrderVerificationStatus\": ... }` |\n| `requestBody` | 整包 PATCH body 对象 |\n\n成功可能为 **204**。\n\n### 3.9 `confirm_shipment.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| requestBody | object | 是 | 与官方 **confirmShipment** schema 一致 |\n\n成功可能为 **204**。\n\n---\n\n## 4. 响应与错误\n\n- 脚本统一输出 JSON：`developerProxy` 为网关原样；部分脚本增加 **`resolvedPath`**、**`queryString`**、**`requestBody`**。\n- 优先阅读 **`developerProxy.errcode`**、**`developerProxy.httpStatus`**，再读 **`developerProxy.body`**（常为 Amazon 错误 JSON）。\n- **429**：需降频重试；searchOrders 默认速率较低。\n- HTTP 401 或 authorized error：按 SKILL.md 的 **## 解决认证和积分问题** 处理。\n- HTTP 402：按 SKILL.md 的 **## 解决认证和积分问题** 处理。\n\n---\n\n## 5. 受限数据与 deprecated\n\n- **getOrderBuyerInfo / getOrderAddress / getOrderItems / getOrderItemsBuyerInfo** 在官方文档中标记为 **deprecated**；敏感数据需 **RDT** 与数据保护策略，见 [Tokens API](https://developer-docs.amazon.com/sp-api/reference/createrestricteddatatoken) 与 Orders 文档说明。\n- **getOrderRegulatedInfo** 的 `Accept` 等头若需特化，取决于网关是否支持透传；当前脚本未附加额外 Amazon 请求头。\n\n---\n\n## 6. Feedback\n\n若需反馈本 skill 问题，请在工单或内部渠道注明 **`skillName`: `linkfox-amazon-store-orders`**，并附上 `developerProxy` 完整 JSON（注意脱敏）。\n\nFile v1.0.7:references/onboarding.md\n\n# 解决认证和积分问题\n\n调用本 skill 时若网关返回 **auth** 或 **billing** 错误，走本 skill 自带的 `scripts/onboarding.py` 完成引导。\n\n**auth 场景**：`errcode=401` 或消息含 `authorized error`/`鉴权失败`/`未授权`/`unauthorized`；或 `LINKFOX_AGENT_API_KEY` 与 `LINKFOXAGENT_API_KEY` 均为空。\n1. 若已配置 key → 先让用户重启会话（最常见误判），仍失败让用户重新取 key 或换手机号重注册\n2. 未配置 → 询问：自助去 https://agent.linkfox.com/ 取 key，或提供手机号让脚本注册\n3. 手机号路径：\n   - `python scripts/onboarding.py send-code <phone>` → 展示 JSON 里的 phone/agreements\n   - 收到验证码后：`python scripts/onboarding.py login <phone> <code>`（workbuddy 宿主加 `--channel workbuddy`）\n   - 拿到 `api_key` 后把下面三平台配置转发给用户，提示重启会话生效：\n     - Windows PowerShell（永久）：`setx LINKFOX_AGENT_API_KEY \"<key>\"`\n     - macOS zsh：`echo 'export LINKFOX_AGENT_API_KEY=\"<key>\"' >> ~/.zshrc && source ~/.zshrc`\n     - Linux bash：`echo 'export LINKFOX_AGENT_API_KEY=\"<key>\"' >> ~/.bashrc && source ~/.bashrc`\n     - 变量名 `LINKFOX_AGENT_API_KEY`（主推）或 `LINKFOXAGENT_API_KEY`（老规范）任一即可\n\n**billing 场景**：`errcode=402` 或消息含 `积分/余额/quota/insufficient/充值/套餐到期`。\n- `python scripts/onboarding.py list-plans` → 有 AskUserQuestion 就弹菜单，否则输出编号清单让用户选\n- 校验 `plan_id` ∈ 清单、支付方式 ∈ 该套餐 `available_methods`（通常 `wechat/alipay`）\n- `python scripts/onboarding.py order <plan_id> <method>` → 展示优先级 PNG > `pay_url` > `ascii_qr`（标注兜底）\n- 已付款可选调 `python scripts/onboarding.py query <order_id>`，不主动轮询\n\n排除 `errcode=403`（无权限，不归入这两类）。所有子命令输出 stdout JSON，`error` 字段已含阶段前缀，透传给用户即可。完整用法：`python scripts/onboarding.py --help`。\n\nFile v1.0.7:skill-card.md\n\n## Description:\n\nEnables agents to search, inspect, and update Amazon SP-API Orders through LinkFox's developer proxy, including order details, buyer and address data, order items, shipment status, regulated order information, verification status, and shipment confirmation.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[linkfox-ai](https://clawhub.ai/user/linkfox-ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal Amazon sellers and store operators can use this skill through an agent to retrieve order lists and details, inspect buyer, address, item, and regulated-order data, and perform shipment or verification updates after confirming the action.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill can access Amazon order data, buyer and address information, and other sensitive account data.\n\nMitigation: Install only when LinkFox is trusted for this data, avoid routing credentials to custom hosts, and protect or delete saved response files after use.\n\nRisk: The skill includes order-state-changing workflows such as shipment confirmation, shipment status updates, and regulated-order verification updates.\n\nMitigation: Manually review the target order, request body, and intended business outcome before allowing an agent to run a state-changing command.\n\nRisk: Authentication, billing, and payment onboarding flows are bundled with the skill and may affect account access or spending.\n\nMitigation: Confirm any account, billing, payment, or recharge action with the user before proceeding.\n\n## Reference(s):\n\n- [LinkFox Amazon Orders API and Gateway Usage](artifact/references/api.md)\n- [Authentication and Billing Onboarding](artifact/references/onboarding.md)\n- [ClawHub Skill Page](https://clawhub.ai/linkfox-ai/skills/linkfox-amazon-store-orders)\n- [Amazon SP-API searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders)\n- [Amazon SP-API getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3)\n- [Amazon SP-API getOrderItems](https://developer-docs.amazon.com/sp-api/reference/getorderitems)\n- [Amazon SP-API updateShipmentStatus](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus)\n- [Amazon SP-API confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment)\n\n## Skill Output:\n\n**Output Type(s):** [text, JSON, shell commands, configuration, guidance]\n\n**Output Format:** [JSON files and stdout JSON or summaries, with Markdown guidance for setup and troubleshooting]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Writes full responses under ./linkfox/<date>/<session>/data unless inline output is requested.]\n\n## Skill Version(s):\n\n1.0.7 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.6: 18 files, 36181 bytes\n\nFiles: references/api.md (6430b), references/onboarding.md (2046b), scripts/_spapi_orders_common.py (10630b), scripts/check_auth_dependency.py (6077b), scripts/confirm_shipment.py (2119b), scripts/get_order_address.py (1695b), scripts/get_order_buyer_info.py (1717b), scripts/get_order_items_buyer_info.py (1911b), scripts/get_order_items.py (1841b), scripts/get_order_regulated_info.py (1681b), scripts/get_order.py (2489b), scripts/onboarding.py (24089b), scripts/search_orders.py (4328b), scripts/update_shipment_status.py (2944b), scripts/update_verification_status.py (2497b), skill-card.md (3532b), SKILL.md (8190b), _meta.json (146b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: linkfox-amazon-store-orders\ndescription: 亚马逊店铺订单（与 linkfox-amazon-store-auth / report / listings / pricing 同系列），经 /spApi/developerProxy 调用 SP-API Orders：v2026-01-01 的 searchOrders、getOrder；v0 的 getOrderBuyerInfo、getOrderAddress、getOrderItems、getOrderItemsBuyerInfo、updateShipmentStatus、getOrderRegulatedInfo、updateVerificationStatus、confirmShipment。当用户提到亚马逊订单、searchOrders、getOrder、订单列表、订单详情、买家信息、收货地址、订单行、发货确认、管制订单、核验状态、Orders API、SP-API 订单 时触发。\n---\n\n# Amazon 店铺 Orders\n\n本 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`**。\n\n## 调用方式\n\n- **API 端点**：`POST /spApi/developerProxy`（不同 SP-API 操作通过 path/method 区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-orders-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和积分问题\n发生以下异常情况时，采用 references/onboarding.md 引导解决问题：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示积分或余额不足**：消息含\"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n## 官方参考索引\n\n| 能力 | 文档 |\n|------|------|\n| searchOrders | [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders) |\n| getOrder (v2026-01-01) | [getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3) |\n| getOrderBuyerInfo (deprecated) | [getOrderBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderbuyerinfo) |\n| getOrderAddress (deprecated) | [getOrderAddress](https://developer-docs.amazon.com/sp-api/reference/getorderaddress) |\n| getOrderItems (deprecated) | [getOrderItems](https://developer-docs.amazon.com/sp-api/reference/getorderitems) |\n| getOrderItemsBuyerInfo (deprecated) | [getOrderItemsBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderitemsbuyerinfo) |\n| updateShipmentStatus | [updateShipmentStatus](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus) |\n| getOrderRegulatedInfo | [getOrderRegulatedInfo](https://developer-docs.amazon.com/sp-api/reference/getorderregulatedinfo) |\n| updateVerificationStatus | [updateVerificationStatus](https://developer-docs.amazon.com/sp-api/reference/updateverificationstatus) |\n| confirmShipment | [confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment) |\n\n---\n\n## Prerequisites（必须先读）\n\n本 skill **依赖** **`linkfox-amazon-store-auth`**。\n\n1. 运行 `python scripts/check_auth_dependency.py`；若 exit code **42** 且 stderr 含 `DEPENDENCY_MISSING:`，请先安装 **`linkfox-amazon-store-auth`**。\n2. **不要**在本 skill 内绕过依赖实现授权或令牌逻辑。\n\n---\n\n## Current Capabilities（脚本一览）\n\n| 能力 | developerProxy `path`（要点） | 脚本 |\n|------|------------------------------|------|\n| searchOrders | `orders/2026-01-01/orders` + Query | `search_orders.py` |\n| getOrder | `orders/2026-01-01/orders/{orderId}` + Query | `get_order.py` |\n| getOrderBuyerInfo | `orders/v0/orders/{orderId}/buyerInfo` | `get_order_buyer_info.py` |\n| getOrderAddress | `orders/v0/orders/{orderId}/address` | `get_order_address.py` |\n| getOrderItems | `orders/v0/orders/{orderId}/orderItems` + NextToken | `get_order_items.py` |\n| getOrderItemsBuyerInfo | `orders/v0/orders/{orderId}/orderItems/buyerInfo` | `get_order_items_buyer_info.py` |\n| updateShipmentStatus | `orders/v0/orders/{orderId}/shipment`，POST JSON | `update_shipment_status.py` |\n| getOrderRegulatedInfo | `orders/v0/orders/{orderId}/regulatedInfo` | `get_order_regulated_info.py` |\n| updateVerificationStatus | `orders/v0/orders/{orderId}/regulatedInfo`，PATCH JSON | `update_verification_status.py` |\n| confirmShipment | `orders/v0/orders/{orderId}/shipmentConfirmation`，POST JSON | `confirm_shipment.py` |\n\n共享逻辑见 **`scripts/_spapi_orders_common.py`**（仅供同目录脚本 import，非独立 CLI）。\n\n---\n\n## Quick Parameters（摘要）\n\n- **searchOrders**：`createdAfter` **或** `lastUpdatedAfter`（二选一）；`marketplaceIds`；可选 `fulfillmentStatuses`、`fulfilledBy`、`maxResultsPerPage`、`paginationToken`（上一页 **`nextToken`**）、`includedData`。\n- **getOrder**：`orderId`；可选 **`includedData`**（如 BUYER、FULFILLMENT、PACKAGES）。\n- **getOrderItems / getOrderItemsBuyerInfo**：可选 **`nextToken`** → 查询参数 `NextToken`。\n- **updateShipmentStatus**：`marketplaceId`、`shipmentStatus`（ReadyForPickup / PickedUp / RefusedPickup）；可选 **`orderItems`**。\n- **updateVerificationStatus**：传 **`regulatedOrderVerificationStatus`** 对象，或整包 **`requestBody`**。\n- **confirmShipment**：**`requestBody`** 为官方要求的完整对象（通常含 **`packageDetail`** 等）。\n\n---\n\n## Scripts\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/search_orders.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"lastUpdatedAfter\":\"2026-05-01T00:00:00Z\"}'\n\npython scripts/get_order.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"orderId\":\"123-1234567-1234567\",\"includedData\":[\"FULFILLMENT\",\"PACKAGES\"]}'\n```\n\n---\n\n## Display Rules\n\n1. 先看网关 **`developerProxy.errcode` / `httpStatus`**，再解析各脚本附加字段（如 **`searchOrders`**、**`order`**）。\n2. **POST/PATCH** 脚本：`stdout` 中含 **`requestBody`**（组装后的 Amazon 请求体），便于排查。\n3. **v0 买家/地址/行项目** 接口在官方文档中为 **deprecated**；新集成优先用 **v2026-01-01** 的 **searchOrders / getOrder** 与 **`includedData`** 拉齐业务字段。\n4. **searchOrders** 默认速率较低（官方约 **0.0056 req/s**），注意 **429**。\n5. 受限 PII / RDT 以 Amazon 数据保护政策为准；详见 **`references/api.md`**。\n\n---\n\n## Important Limitations\n\n- 权限：**Orders** 及相关角色；部分读取可能需 **Restricted Data Token**，不在本 skill 内实现。\n- **路径白名单**：若网关返回 **1005** 等拒绝转发，需后端放行 **`orders/v0/...`** 与 **`orders/2026-01-01/...`** 前缀。\n- 返回结构以 Amazon schema 为准；详见 **`references/api.md`**。\n\n## 积分消耗规则\n\n不消耗积分。\n\n**Feedback：** 见 `references/api.md`，`skillName`：`linkfox-amazon-store-orders`。\n\n---\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-orders\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1786099484896\n}\n\nFile v1.0.6:references/api.md\n\n# linkfox-amazon-store-orders — API 与网关调用说明\n\n## 1. 调用链\n\n1. **`POST ${LINKFOX_TOOL_GATEWAY}/spApi/storeTokens`**  \n   Body: `{\"sellerId\":\"<卖家ID>\",\"region\":\"NA|EU|FE|...\"}`  \n   响应需含 **`accessToken`**。\n\n2. **`POST ${LINKFOX_TOOL_GATEWAY}/spApi/developerProxy`**  \n   Body 字段（与 listings / pricing 系列一致）：\n   - **`region`**：与 storeTokens 相同。\n   - **`path`**：Amazon SP-API 相对 path，**无**前导 `/`。\n   - **`method`**：`GET` | `POST` | `PATCH`。\n   - **`amzAccessToken`**：上一步的 access token。\n   - **`queryString`**（可选）：URL 查询串，不含 `?`。\n   - **`body`**（POST/PATCH）：JSON 字符串。\n   - **`contentType`**：如 `application/json`。\n\n环境变量：\n\n- **`LINKFOX_AGENT_API_KEY`**（或 **`LINKFOXAGENT_API_KEY`**，必填）：网关鉴权。（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理）\n- **`LINKFOX_TOOL_GATEWAY`**（或 `STORE_API_BASE_URL` / `SPAPI_BASE_URL`，可选）：默认 `https://tool-gateway.linkfox.com`。\n\n---\n\n## 2. 脚本与 path / method 对照\n\n| 脚本 | method | path 模板 |\n|------|--------|-----------|\n| `search_orders.py` | GET | `orders/2026-01-01/orders` |\n| `get_order.py` | GET | `orders/2026-01-01/orders/{orderId}` |\n| `get_order_buyer_info.py` | GET | `orders/v0/orders/{orderId}/buyerInfo` |\n| `get_order_address.py` | GET | `orders/v0/orders/{orderId}/address` |\n| `get_order_items.py` | GET | `orders/v0/orders/{orderId}/orderItems` |\n| `get_order_items_buyer_info.py` | GET | `orders/v0/orders/{orderId}/orderItems/buyerInfo` |\n| `update_shipment_status.py` | POST | `orders/v0/orders/{orderId}/shipment` |\n| `get_order_regulated_info.py` | GET | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `update_verification_status.py` | PATCH | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `confirm_shipment.py` | POST | `orders/v0/orders/{orderId}/shipmentConfirmation` |\n\n`orderId` 在 path 中经 **percent-encoding**（与 listings SKU 处理一致）。\n\n---\n\n## 3. 各脚本 JSON 入参\n\n### 3.1 公共字段\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| sellerId | string | 是 | 卖家 ID |\n| region | string | 是 | NA / EU / FE 等与 auth 一致 |\n| skipDepCheck | boolean | 否 | 为 true 时跳过本地依赖探测 |\n\n### 3.2 `search_orders.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| marketplaceIds | string[] | 是 | 站点 ID 列表，长度 ≤ 50（以 Amazon 为准） |\n| createdAfter | string | 条件 | ISO 8601；与 `lastUpdatedAfter` **二选一** |\n| createdBefore | string | 否 | 与 `createdAfter` 同组使用 |\n| lastUpdatedAfter | string | 条件 | ISO 8601；与 `createdAfter` **二选一** |\n| lastUpdatedBefore | string | 否 | 与 `lastUpdatedAfter` 同组使用 |\n| fulfillmentStatuses | string[] | 否 | 如 PENDING、UNSHIPPED、SHIPPED、CANCELLED 等 |\n| fulfilledBy | string[] | 否 | MERCHANT、AMAZON |\n| maxResultsPerPage | number | 否 | 1～100，默认 100 |\n| paginationToken | string | 否 | 上一页响应 **`nextToken`** |\n| includedData | string[] | 否 | BUYER、RECIPIENT、PROCEEDS、FULFILLMENT、PACKAGES 等（见 [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders)） |\n\n脚本会在 stdout 的 JSON 中解析 **`searchOrders`**（当 `developerProxy.errcode==200` 且 `httpStatus==200` 时由 `body` JSON 解析）。\n\n### 3.3 `get_order.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | 亚马逊订单号 |\n| includedData | string[] | 否 | 同官方 `includedData` |\n\n解析字段：**`order`**。\n\n### 3.4 `get_order_buyer_info.py` / `get_order_address.py`\n\n| 字段 | 类型 | 必填 |\n|------|------|------|\n| orderId | string | 是 |\n\n解析字段：**`buyerInfo`** / **`shippingAddress`**（以实际 JSON 为准）。\n\n### 3.5 `get_order_items.py` / `get_order_items_buyer_info.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| nextToken | string | 否 | 映射为查询参数 **`NextToken`** |\n\n解析字段：**`orderItems`** / **`orderItemsBuyerInfo`**。\n\n### 3.6 `update_shipment_status.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| marketplaceId | string | 是 | |\n| shipmentStatus | string | 是 | ReadyForPickup、PickedUp、RefusedPickup |\n| orderItems | object[] | 否 | 部分更新时的行项目 |\n\n成功时 Amazon 常返回 **HTTP 204**，stdout 中 **`developerProxy`** 含状态即可，未必有 JSON body。\n\n### 3.7 `get_order_regulated_info.py`\n\n仅需 **`orderId`**。解析字段：**`regulatedOrder`**。\n\n### 3.8 `update_verification_status.py`\n\n| 方式 | 说明 |\n|------|------|\n| `regulatedOrderVerificationStatus` | 对象，脚本包装为 `{ \"regulatedOrderVerificationStatus\": ... }` |\n| `requestBody` | 整包 PATCH body 对象 |\n\n成功可能为 **204**。\n\n### 3.9 `confirm_shipment.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| requestBody | object | 是 | 与官方 **confirmShipment** schema 一致 |\n\n成功可能为 **204**。\n\n---\n\n## 4. 响应与错误\n\n- 脚本统一输出 JSON：`developerProxy` 为网关原样；部分脚本增加 **`resolvedPath`**、**`queryString`**、**`requestBody`**。\n- 优先阅读 **`developerProxy.errcode`**、**`developerProxy.httpStatus`**，再读 **`developerProxy.body`**（常为 Amazon 错误 JSON）。\n- **429**：需降频重试；searchOrders 默认速率较低。\n- HTTP 401 或 authorized error：按 SKILL.md 的 **## 解决认证和积分问题** 处理。\n- HTTP 402：按 SKILL.md 的 **## 解决认证和积分问题** 处理。\n\n---\n\n## 5. 受限数据与 deprecated\n\n- **getOrderBuyerInfo / getOrderAddress / getOrderItems / getOrderItemsBuyerInfo** 在官方文档中标记为 **deprecated**；敏感数据需 **RDT** 与数据保护策略，见 [Tokens API](https://developer-docs.amazon.com/sp-api/reference/createrestricteddatatoken) 与 Orders 文档说明。\n- **getOrderRegulatedInfo** 的 `Accept` 等头若需特化，取决于网关是否支持透传；当前脚本未附加额外 Amazon 请求头。\n\n---\n\n## 6. Feedback\n\n若需反馈本 skill 问题，请在工单或内部渠道注明 **`skillName`: `linkfox-amazon-store-orders`**，并附上 `developerProxy` 完整 JSON（注意脱敏）。\n\nFile v1.0.6:references/onboarding.md\n\n# 解决认证和积分问题\n\n调用本 skill 时若网关返回 **auth** 或 **billing** 错误，走本 skill 自带的 `scripts/onboarding.py` 完成引导。\n\n**auth 场景**：`errcode=401` 或消息含 `authorized error`/`鉴权失败`/`未授权`/`unauthorized`；或 `LINKFOX_AGENT_API_KEY` 与 `LINKFOXAGENT_API_KEY` 均为空。\n1. 若已配置 key → 先让用户重启会话（最常见误判），仍失败让用户重新取 key 或换手机号重注册\n2. 未配置 → 询问：自助去 https://agent.linkfox.com/ 取 key，或提供手机号让脚本注册\n3. 手机号路径：\n   - `python scripts/onboarding.py send-code <phone>` → 展示 JSON 里的 phone/agreements\n   - 收到验证码后：`python scripts/onboarding.py login <phone> <code>`（workbuddy 宿主加 `--channel workbuddy`）\n   - 拿到 `api_key` 后把下面三平台配置转发给用户，提示重启会话生效：\n     - Windows PowerShell（永久）：`setx LINKFOX_AGENT_API_KEY \"<key>\"`\n     - macOS zsh：`echo 'export LINKFOX_AGENT_API_KEY=\"<key>\"' >> ~/.zshrc && source ~/.zshrc`\n     - Linux bash：`echo 'export LINKFOX_AGENT_API_KEY=\"<key>\"' >> ~/.bashrc && source ~/.bashrc`\n     - 变量名 `LINKFOX_AGENT_API_KEY`（主推）或 `LINKFOXAGENT_API_KEY`（老规范）任一即可\n\n**billing 场景**：`errcode=402` 或消息含 `积分/余额/quota/insufficient/充值/套餐到期`。\n- `python scripts/onboarding.py list-plans` → 有 AskUserQuestion 就弹菜单，否则输出编号清单让用户选\n- 校验 `plan_id` ∈ 清单、支付方式 ∈ 该套餐 `available_methods`（通常 `wechat/alipay`）\n- `python scripts/onboarding.py order <plan_id> <method>` → 展示优先级 PNG > `pay_url` > `ascii_qr`（标注兜底）\n- 已付款可选调 `python scripts/onboarding.py query <order_id>`，不主动轮询\n\n排除 `errcode=403`（无权限，不归入这两类）。所有子命令输出 stdout JSON，`error` 字段已含阶段前缀，透传给用户即可。完整用法：`python scripts/onboarding.py --help`。\n\nFile v1.0.6:skill-card.md\n\n## Description:\n\n亚马逊店铺订单 skill uses LinkFox's developer proxy to call Amazon SP-API Orders operations for order search, order details, buyer information, shipping addresses, order items, regulated order data, verification status updates, shipment status updates, and shipment confirmation.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[linkfox-ai](https://clawhub.ai/user/linkfox-ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal developers and Amazon sellers use this skill to retrieve and update Amazon store order data through LinkFox's gateway-backed SP-API Orders scripts. It supports operational order lookup, buyer and address retrieval, order-item inspection, regulated-order status handling, and shipment workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill routes Amazon order data, API keys, phone/SMS login flows, and payment-plan actions through LinkFox-controlled services.\n\nMitigation: Use the skill only when the user trusts LinkFox for these workflows, and confirm account, billing, and payment actions before running onboarding commands.\n\nRisk: Full order responses are saved to local linkfox session data files, which may contain sensitive Amazon order or buyer information.\n\nMitigation: Run the skill in a workspace where saved response files are excluded from commits and sharing, and redact sensitive values before attaching logs or feedback.\n\nRisk: Endpoint override environment variables can redirect gateway traffic and expose credentials or order data to an unintended destination.\n\nMitigation: Avoid LINKFOX_TOOL_GATEWAY, STORE_API_BASE_URL, SPAPI_BASE_URL, and related onboarding endpoint overrides unless the destination is explicitly controlled and trusted.\n\nRisk: Some Orders operations can access restricted buyer, address, or regulated-order data.\n\nMitigation: Use only the minimum required Orders operation and includedData fields, and follow Amazon restricted-data requirements when buyer, address, or regulated-order information is requested.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/linkfox-ai/skills/linkfox-amazon-store-orders)\n- [API and gateway usage reference](artifact/references/api.md)\n- [Authentication and billing onboarding reference](artifact/references/onboarding.md)\n- [Amazon SP-API searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders)\n- [Amazon SP-API getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3)\n- [Amazon SP-API confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment)\n- [Amazon SP-API Restricted Data Token](https://developer-docs.amazon.com/sp-api/reference/createrestricteddatatoken)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Code, Shell commands, Configuration, JSON files]\n\n**Output Format:** [Markdown guidance with shell commands and JSON API responses saved to local files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Scripts print full JSON for responses up to 8 KB, otherwise print summaries unless --inline is used; full responses are always saved under a linkfox session data directory.]\n\n## Skill Version(s):\n\n1.0.6 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.5: 16 files, 27674 bytes\n\nFiles: references/api.md (6430b), scripts/_spapi_orders_common.py (10642b), scripts/check_auth_dependency.py (6077b), scripts/confirm_shipment.py (2369b), scripts/get_order_address.py (1945b), scripts/get_order_buyer_info.py (1967b), scripts/get_order_items_buyer_info.py (2161b), scripts/get_order_items.py (2091b), scripts/get_order_regulated_info.py (1931b), scripts/get_order.py (2710b), scripts/search_orders.py (4549b), scripts/update_shipment_status.py (3194b), scripts/update_verification_status.py (2747b), skill-card.md (2784b), SKILL.md (8680b), _meta.json (146b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: linkfox-amazon-store-orders\ndescription: 亚马逊店铺订单（与 linkfox-amazon-store-auth / report / listings / pricing 同系列），经 /spApi/developerProxy 调用 SP-API Orders：v2026-01-01 的 searchOrders、getOrder；v0 的 getOrderBuyerInfo、getOrderAddress、getOrderItems、getOrderItemsBuyerInfo、updateShipmentStatus、getOrderRegulatedInfo、updateVerificationStatus、confirmShipment。当用户提到亚马逊订单、searchOrders、getOrder、订单列表、订单详情、买家信息、收货地址、订单行、发货确认、管制订单、核验状态、Orders API、SP-API 订单 时触发。\n---\n\n# Amazon 店铺 Orders\n\n本 skill 与 **`linkfox-amazon-store-auth`**、**`linkfox-amazon-store-report`**、**`linkfox-amazon-store-listings`**、**`linkfox-amazon-store-pricing`** 同属 **Amazon Store** 系列：先 **`POST /spApi/storeTokens`** 取 **`accessToken`**，再 **`POST /spApi/developerProxy`** 转发上游 **`GET` / `POST` / `PATCH`**。\n\n## 调用方式\n\n- **API 端点**：`POST /spApi/developerProxy`（不同 SP-API 操作通过 path/method 区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-orders-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和积分问题\n发生以下异常情况时，采用以下措施来处理：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示积分或余额不足**：消息含\"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n### 措施\n- 优先采用skill内的 onboarding.md 引导解决问题。\n- 如找不到 onboarding.md 文件，则加载 /linkfox-onboarding 这个skill并根据它的引导来处理。如未安装请先安装：\n    - 下载 https://agent-files.linkfox.com/skills/linkfox-onboarding/release.zip，解压后安装这个skill。如需用户授权才可下载，要询问用户获得授权，你不能自己放弃下载。\n- 兜底措施：仅当前面两个措施经过所有努力都走不通时，才提示用户依据 https://skill.linkfox.com/linkfoxskills/guide.htm 指引获取API Key，或去 https://os.linkfox.com/ 补充积分。\n\n## 官方参考索引\n\n| 能力 | 文档 |\n|------|------|\n| searchOrders | [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders) |\n| getOrder (v2026-01-01) | [getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3) |\n| getOrderBuyerInfo (deprecated) | [getOrderBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderbuyerinfo) |\n| getOrderAddress (deprecated) | [getOrderAddress](https://developer-docs.amazon.com/sp-api/reference/getorderaddress) |\n| getOrderItems (deprecated) | [getOrderItems](https://developer-docs.amazon.com/sp-api/reference/getorderitems) |\n| getOrderItemsBuyerInfo (deprecated) | [getOrderItemsBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderitemsbuyerinfo) |\n| updateShipmentStatus | [updateShipmentStatus](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus) |\n| getOrderRegulatedInfo | [getOrderRegulatedInfo](https://developer-docs.amazon.com/sp-api/reference/getorderregulatedinfo) |\n| updateVerificationStatus | [updateVerificationStatus](https://developer-docs.amazon.com/sp-api/reference/updateverificationstatus) |\n| confirmShipment | [confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment) |\n\n---\n\n## Prerequisites（必须先读）\n\n本 skill **依赖** **`linkfox-amazon-store-auth`**。\n\n1. 运行 `python scripts/check_auth_dependency.py`；若 exit code **42** 且 stderr 含 `DEPENDENCY_MISSING:`，请先安装 **`linkfox-amazon-store-auth`**。\n2. **不要**在本 skill 内绕过依赖实现授权或令牌逻辑。\n\n---\n\n## Current Capabilities（脚本一览）\n\n| 能力 | developerProxy `path`（要点） | 脚本 |\n|------|------------------------------|------|\n| searchOrders | `orders/2026-01-01/orders` + Query | `search_orders.py` |\n| getOrder | `orders/2026-01-01/orders/{orderId}` + Query | `get_order.py` |\n| getOrderBuyerInfo | `orders/v0/orders/{orderId}/buyerInfo` | `get_order_buyer_info.py` |\n| getOrderAddress | `orders/v0/orders/{orderId}/address` | `get_order_address.py` |\n| getOrderItems | `orders/v0/orders/{orderId}/orderItems` + NextToken | `get_order_items.py` |\n| getOrderItemsBuyerInfo | `orders/v0/orders/{orderId}/orderItems/buyerInfo` | `get_order_items_buyer_info.py` |\n| updateShipmentStatus | `orders/v0/orders/{orderId}/shipment`，POST JSON | `update_shipment_status.py` |\n| getOrderRegulatedInfo | `orders/v0/orders/{orderId}/regulatedInfo` | `get_order_regulated_info.py` |\n| updateVerificationStatus | `orders/v0/orders/{orderId}/regulatedInfo`，PATCH JSON | `update_verification_status.py` |\n| confirmShipment | `orders/v0/orders/{orderId}/shipmentConfirmation`，POST JSON | `confirm_shipment.py` |\n\n共享逻辑见 **`scripts/_spapi_orders_common.py`**（仅供同目录脚本 import，非独立 CLI）。\n\n---\n\n## Quick Parameters（摘要）\n\n- **searchOrders**：`createdAfter` **或** `lastUpdatedAfter`（二选一）；`marketplaceIds`；可选 `fulfillmentStatuses`、`fulfilledBy`、`maxResultsPerPage`、`paginationToken`（上一页 **`nextToken`**）、`includedData`。\n- **getOrder**：`orderId`；可选 **`includedData`**（如 BUYER、FULFILLMENT、PACKAGES）。\n- **getOrderItems / getOrderItemsBuyerInfo**：可选 **`nextToken`** → 查询参数 `NextToken`。\n- **updateShipmentStatus**：`marketplaceId`、`shipmentStatus`（ReadyForPickup / PickedUp / RefusedPickup）；可选 **`orderItems`**。\n- **updateVerificationStatus**：传 **`regulatedOrderVerificationStatus`** 对象，或整包 **`requestBody`**。\n- **confirmShipment**：**`requestBody`** 为官方要求的完整对象（通常含 **`packageDetail`** 等）。\n\n---\n\n## Scripts\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/search_orders.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"lastUpdatedAfter\":\"2026-05-01T00:00:00Z\"}'\n\npython scripts/get_order.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"orderId\":\"123-1234567-1234567\",\"includedData\":[\"FULFILLMENT\",\"PACKAGES\"]}'\n```\n\n---\n\n## Display Rules\n\n1. 先看网关 **`developerProxy.errcode` / `httpStatus`**，再解析各脚本附加字段（如 **`searchOrders`**、**`order`**）。\n2. **POST/PATCH** 脚本：`stdout` 中含 **`requestBody`**（组装后的 Amazon 请求体），便于排查。\n3. **v0 买家/地址/行项目** 接口在官方文档中为 **deprecated**；新集成优先用 **v2026-01-01** 的 **searchOrders / getOrder** 与 **`includedData`** 拉齐业务字段。\n4. **searchOrders** 默认速率较低（官方约 **0.0056 req/s**），注意 **429**。\n5. 受限 PII / RDT 以 Amazon 数据保护政策为准；详见 **`references/api.md`**。\n\n---\n\n## Important Limitations\n\n- 权限：**Orders** 及相关角色；部分读取可能需 **Restricted Data Token**，不在本 skill 内实现。\n- **路径白名单**：若网关返回 **1005** 等拒绝转发，需后端放行 **`orders/v0/...`** 与 **`orders/2026-01-01/...`** 前缀。\n- 返回结构以 Amazon schema 为准；详见 **`references/api.md`**。\n\n## 积分消耗规则\n\n不消耗积分。\n\n**Feedback：** 见 `references/api.md`，`skillName`：`linkfox-amazon-store-orders`。\n\n---\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-orders\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1783944320399\n}\n\nFile v1.0.5:references/api.md\n\n# linkfox-amazon-store-orders — API 与网关调用说明\n\n## 1. 调用链\n\n1. **`POST ${LINKFOX_TOOL_GATEWAY}/spApi/storeTokens`**  \n   Body: `{\"sellerId\":\"<卖家ID>\",\"region\":\"NA|EU|FE|...\"}`  \n   响应需含 **`accessToken`**。\n\n2. **`POST ${LINKFOX_TOOL_GATEWAY}/spApi/developerProxy`**  \n   Body 字段（与 listings / pricing 系列一致）：\n   - **`region`**：与 storeTokens 相同。\n   - **`path`**：Amazon SP-API 相对 path，**无**前导 `/`。\n   - **`method`**：`GET` | `POST` | `PATCH`。\n   - **`amzAccessToken`**：上一步的 access token。\n   - **`queryString`**（可选）：URL 查询串，不含 `?`。\n   - **`body`**（POST/PATCH）：JSON 字符串。\n   - **`contentType`**：如 `application/json`。\n\n环境变量：\n\n- **`LINKFOX_AGENT_API_KEY`**（或 **`LINKFOXAGENT_API_KEY`**，必填）：网关鉴权。（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理）\n- **`LINKFOX_TOOL_GATEWAY`**（或 `STORE_API_BASE_URL` / `SPAPI_BASE_URL`，可选）：默认 `https://tool-gateway.linkfox.com`。\n\n---\n\n## 2. 脚本与 path / method 对照\n\n| 脚本 | method | path 模板 |\n|------|--------|-----------|\n| `search_orders.py` | GET | `orders/2026-01-01/orders` |\n| `get_order.py` | GET | `orders/2026-01-01/orders/{orderId}` |\n| `get_order_buyer_info.py` | GET | `orders/v0/orders/{orderId}/buyerInfo` |\n| `get_order_address.py` | GET | `orders/v0/orders/{orderId}/address` |\n| `get_order_items.py` | GET | `orders/v0/orders/{orderId}/orderItems` |\n| `get_order_items_buyer_info.py` | GET | `orders/v0/orders/{orderId}/orderItems/buyerInfo` |\n| `update_shipment_status.py` | POST | `orders/v0/orders/{orderId}/shipment` |\n| `get_order_regulated_info.py` | GET | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `update_verification_status.py` | PATCH | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `confirm_shipment.py` | POST | `orders/v0/orders/{orderId}/shipmentConfirmation` |\n\n`orderId` 在 path 中经 **percent-encoding**（与 listings SKU 处理一致）。\n\n---\n\n## 3. 各脚本 JSON 入参\n\n### 3.1 公共字段\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| sellerId | string | 是 | 卖家 ID |\n| region | string | 是 | NA / EU / FE 等与 auth 一致 |\n| skipDepCheck | boolean | 否 | 为 true 时跳过本地依赖探测 |\n\n### 3.2 `search_orders.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| marketplaceIds | string[] | 是 | 站点 ID 列表，长度 ≤ 50（以 Amazon 为准） |\n| createdAfter | string | 条件 | ISO 8601；与 `lastUpdatedAfter` **二选一** |\n| createdBefore | string | 否 | 与 `createdAfter` 同组使用 |\n| lastUpdatedAfter | string | 条件 | ISO 8601；与 `createdAfter` **二选一** |\n| lastUpdatedBefore | string | 否 | 与 `lastUpdatedAfter` 同组使用 |\n| fulfillmentStatuses | string[] | 否 | 如 PENDING、UNSHIPPED、SHIPPED、CANCELLED 等 |\n| fulfilledBy | string[] | 否 | MERCHANT、AMAZON |\n| maxResultsPerPage | number | 否 | 1～100，默认 100 |\n| paginationToken | string | 否 | 上一页响应 **`nextToken`** |\n| includedData | string[] | 否 | BUYER、RECIPIENT、PROCEEDS、FULFILLMENT、PACKAGES 等（见 [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders)） |\n\n脚本会在 stdout 的 JSON 中解析 **`searchOrders`**（当 `developerProxy.errcode==200` 且 `httpStatus==200` 时由 `body` JSON 解析）。\n\n### 3.3 `get_order.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | 亚马逊订单号 |\n| includedData | string[] | 否 | 同官方 `includedData` |\n\n解析字段：**`order`**。\n\n### 3.4 `get_order_buyer_info.py` / `get_order_address.py`\n\n| 字段 | 类型 | 必填 |\n|------|------|------|\n| orderId | string | 是 |\n\n解析字段：**`buyerInfo`** / **`shippingAddress`**（以实际 JSON 为准）。\n\n### 3.5 `get_order_items.py` / `get_order_items_buyer_info.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| nextToken | string | 否 | 映射为查询参数 **`NextToken`** |\n\n解析字段：**`orderItems`** / **`orderItemsBuyerInfo`**。\n\n### 3.6 `update_shipment_status.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| marketplaceId | string | 是 | |\n| shipmentStatus | string | 是 | ReadyForPickup、PickedUp、RefusedPickup |\n| orderItems | object[] | 否 | 部分更新时的行项目 |\n\n成功时 Amazon 常返回 **HTTP 204**，stdout 中 **`developerProxy`** 含状态即可，未必有 JSON body。\n\n### 3.7 `get_order_regulated_info.py`\n\n仅需 **`orderId`**。解析字段：**`regulatedOrder`**。\n\n### 3.8 `update_verification_status.py`\n\n| 方式 | 说明 |\n|------|------|\n| `regulatedOrderVerificationStatus` | 对象，脚本包装为 `{ \"regulatedOrderVerificationStatus\": ... }` |\n| `requestBody` | 整包 PATCH body 对象 |\n\n成功可能为 **204**。\n\n### 3.9 `confirm_shipment.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| requestBody | object | 是 | 与官方 **confirmShipment** schema 一致 |\n\n成功可能为 **204**。\n\n---\n\n## 4. 响应与错误\n\n- 脚本统一输出 JSON：`developerProxy` 为网关原样；部分脚本增加 **`resolvedPath`**、**`queryString`**、**`requestBody`**。\n- 优先阅读 **`developerProxy.errcode`**、**`developerProxy.httpStatus`**，再读 **`developerProxy.body`**（常为 Amazon 错误 JSON）。\n- **429**：需降频重试；searchOrders 默认速率较低。\n- HTTP 401 或 authorized error：按 SKILL.md 的 **## 解决认证和积分问题** 处理。\n- HTTP 402：按 SKILL.md 的 **## 解决认证和积分问题** 处理。\n\n---\n\n## 5. 受限数据与 deprecated\n\n- **getOrderBuyerInfo / getOrderAddress / getOrderItems / getOrderItemsBuyerInfo** 在官方文档中标记为 **deprecated**；敏感数据需 **RDT** 与数据保护策略，见 [Tokens API](https://developer-docs.amazon.com/sp-api/reference/createrestricteddatatoken) 与 Orders 文档说明。\n- **getOrderRegulatedInfo** 的 `Accept` 等头若需特化，取决于网关是否支持透传；当前脚本未附加额外 Amazon 请求头。\n\n---\n\n## 6. Feedback\n\n若需反馈本 skill 问题，请在工单或内部渠道注明 **`skillName`: `linkfox-amazon-store-orders`**，并附上 `developerProxy` 完整 JSON（注意脱敏）。\n\nFile v1.0.5:skill-card.md\n\n## Description: <br>\nHelps agents search Amazon seller orders, retrieve order, buyer, address, item, and regulated-order details, and run shipment or verification status actions for Amazon SP-API Orders workflows. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[linkfox-ai](https://clawhub.ai/user/linkfox-ai) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal sellers, operators, and developers use this skill to inspect Amazon store orders, retrieve buyer or order item details, and perform shipment or regulated-order status updates through guided agent workflows. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can read sensitive Amazon order, buyer, address, item, and regulated-order data. <br>\nMitigation: Use it only from a private workspace, request buyer or address details only when needed, and keep access limited to trusted users. <br>\nRisk: The skill can change shipment or regulated-order verification state. <br>\nMitigation: Require explicit human confirmation before running shipment confirmation, shipment status, or verification update scripts. <br>\nRisk: The skill saves complete API responses locally, which can retain sensitive order data. <br>\nMitigation: Review saved linkfox data files for retention and remove sensitive outputs when they are no longer needed. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/linkfox-ai/skills/linkfox-amazon-store-orders) <br>\n- [Local API and Gateway Reference](references/api.md) <br>\n- [Amazon SP-API searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders) <br>\n- [Amazon SP-API getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3) <br>\n- [Amazon SP-API Restricted Data Token](https://developer-docs.amazon.com/sp-api/reference/createrestricteddatatoken) <br>\n- [Amazon SP-API confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown guidance with shell command examples and JSON script outputs] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Scripts save complete JSON responses locally and may print either full JSON or a summarized response depending on response size.] <br>\n\n## Skill Version(s): <br>\n1.0.5 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.4: 16 files, 27015 bytes\n\nFiles: references/api.md (6182b), scripts/_spapi_orders_common.py (10560b), scripts/check_auth_dependency.py (6077b), scripts/confirm_shipment.py (2369b), scripts/get_order_address.py (1945b), scripts/get_order_buyer_info.py (1967b), scripts/get_order_items_buyer_info.py (2161b), scripts/get_order_items.py (2091b), scripts/get_order_regulated_info.py (1931b), scripts/get_order.py (2710b), scripts/search_orders.py (4549b), scripts/update_shipment_status.py (3194b), scripts/update_verification_status.py (2747b), skill-card.md (3140b), SKILL.md (7546b), _meta.json (146b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: linkfox-amazon-store-orders\ndescription: 亚马逊店铺订单（与 linkfox-amazon-store-auth / report / listings / pricing 同系列），经 /spApi/developerProxy 调用 SP-API Orders：v2026-01-01 的 searchOrders、getOrder；v0 的 getOrderBuyerInfo、getOrderAddress、getOrderItems、getOrderItemsBuyerInfo、updateShipmentStatus、getOrderRegulatedInfo、updateVerificationStatus、confirmShipment。当用户提到亚马逊订单、searchOrders、getOrder、订单列表、订单详情、买家信息、收货地址、订单行、发货确认、管制订单、核验状态、Orders API、SP-API 订单 时触发。\n---\n\n# Amazon 店铺 Orders\n\n本 skill 与 **`linkfox-amazon-store-auth`**、**`linkfox-amazon-store-report`**、**`linkfox-amazon-store-listings`**、**`linkfox-amazon-store-pricing`** 同属 **Amazon Store** 系列：先 **`POST /spApi/storeTokens`** 取 **`accessToken`**，再 **`POST /spApi/developerProxy`** 转发上游 **`GET` / `POST` / `PATCH`**。\n\n## 调用方式\n\n- **API 端点**：`POST /spApi/developerProxy`（不同 SP-API 操作通过 path/method 区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-orders-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 官方参考索引\n\n| 能力 | 文档 |\n|------|------|\n| searchOrders | [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders) |\n| getOrder (v2026-01-01) | [getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3) |\n| getOrderBuyerInfo (deprecated) | [getOrderBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderbuyerinfo) |\n| getOrderAddress (deprecated) | [getOrderAddress](https://developer-docs.amazon.com/sp-api/reference/getorderaddress) |\n| getOrderItems (deprecated) | [getOrderItems](https://developer-docs.amazon.com/sp-api/reference/getorderitems) |\n| getOrderItemsBuyerInfo (deprecated) | [getOrderItemsBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderitemsbuyerinfo) |\n| updateShipmentStatus | [updateShipmentStatus](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus) |\n| getOrderRegulatedInfo | [getOrderRegulatedInfo](https://developer-docs.amazon.com/sp-api/reference/getorderregulatedinfo) |\n| updateVerificationStatus | [updateVerificationStatus](https://developer-docs.amazon.com/sp-api/reference/updateverificationstatus) |\n| confirmShipment | [confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment) |\n\n---\n\n## Prerequisites（必须先读）\n\n本 skill **依赖** **`linkfox-amazon-store-auth`**。\n\n1. 运行 `python scripts/check_auth_dependency.py`；若 exit code **42** 且 stderr 含 `DEPENDENCY_MISSING:`，请先安装 **`linkfox-amazon-store-auth`**。\n2. **不要**在本 skill 内绕过依赖实现授权或令牌逻辑。\n\n---\n\n## Current Capabilities（脚本一览）\n\n| 能力 | developerProxy `path`（要点） | 脚本 |\n|------|------------------------------|------|\n| searchOrders | `orders/2026-01-01/orders` + Query | `search_orders.py` |\n| getOrder | `orders/2026-01-01/orders/{orderId}` + Query | `get_order.py` |\n| getOrderBuyerInfo | `orders/v0/orders/{orderId}/buyerInfo` | `get_order_buyer_info.py` |\n| getOrderAddress | `orders/v0/orders/{orderId}/address` | `get_order_address.py` |\n| getOrderItems | `orders/v0/orders/{orderId}/orderItems` + NextToken | `get_order_items.py` |\n| getOrderItemsBuyerInfo | `orders/v0/orders/{orderId}/orderItems/buyerInfo` | `get_order_items_buyer_info.py` |\n| updateShipmentStatus | `orders/v0/orders/{orderId}/shipment`，POST JSON | `update_shipment_status.py` |\n| getOrderRegulatedInfo | `orders/v0/orders/{orderId}/regulatedInfo` | `get_order_regulated_info.py` |\n| updateVerificationStatus | `orders/v0/orders/{orderId}/regulatedInfo`，PATCH JSON | `update_verification_status.py` |\n| confirmShipment | `orders/v0/orders/{orderId}/shipmentConfirmation`，POST JSON | `confirm_shipment.py` |\n\n共享逻辑见 **`scripts/_spapi_orders_common.py`**（仅供同目录脚本 import，非独立 CLI）。\n\n---\n\n## Quick Parameters（摘要）\n\n- **searchOrders**：`createdAfter` **或** `lastUpdatedAfter`（二选一）；`marketplaceIds`；可选 `fulfillmentStatuses`、`fulfilledBy`、`maxResultsPerPage`、`paginationToken`（上一页 **`nextToken`**）、`includedData`。\n- **getOrder**：`orderId`；可选 **`includedData`**（如 BUYER、FULFILLMENT、PACKAGES）。\n- **getOrderItems / getOrderItemsBuyerInfo**：可选 **`nextToken`** → 查询参数 `NextToken`。\n- **updateShipmentStatus**：`marketplaceId`、`shipmentStatus`（ReadyForPickup / PickedUp / RefusedPickup）；可选 **`orderItems`**。\n- **updateVerificationStatus**：传 **`regulatedOrderVerificationStatus`** 对象，或整包 **`requestBody`**。\n- **confirmShipment**：**`requestBody`** 为官方要求的完整对象（通常含 **`packageDetail`** 等）。\n\n---\n\n## Scripts\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/search_orders.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"lastUpdatedAfter\":\"2026-05-01T00:00:00Z\"}'\n\npython scripts/get_order.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"orderId\":\"123-1234567-1234567\",\"includedData\":[\"FULFILLMENT\",\"PACKAGES\"]}'\n```\n\n---\n\n## Display Rules\n\n1. 先看网关 **`developerProxy.errcode` / `httpStatus`**，再解析各脚本附加字段（如 **`searchOrders`**、**`order`**）。\n2. **POST/PATCH** 脚本：`stdout` 中含 **`requestBody`**（组装后的 Amazon 请求体），便于排查。\n3. **v0 买家/地址/行项目** 接口在官方文档中为 **deprecated**；新集成优先用 **v2026-01-01** 的 **searchOrders / getOrder** 与 **`includedData`** 拉齐业务字段。\n4. **searchOrders** 默认速率较低（官方约 **0.0056 req/s**），注意 **429**。\n5. 受限 PII / RDT 以 Amazon 数据保护政策为准；详见 **`references/api.md`**。\n\n---\n\n## Important Limitations\n\n- 权限：**Orders** 及相关角色；部分读取可能需 **Restricted Data Token**，不在本 skill 内实现。\n- **路径白名单**：若网关返回 **1005** 等拒绝转发，需后端放行 **`orders/v0/...`** 与 **`orders/2026-01-01/...`** 前缀。\n- 返回结构以 Amazon schema 为准；详见 **`references/api.md`**。\n\n**Feedback：** 见 `references/api.md`，`skillName`：`linkfox-amazon-store-orders`。\n\n---\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-orders\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1783336427596\n}\n\nFile v1.0.4:references/api.md\n\n# linkfox-amazon-store-orders — API 与网关调用说明\n\n## 1. 调用链\n\n1. **`POST ${LINKFOX_TOOL_GATEWAY}/spApi/storeTokens`**  \n   Body: `{\"sellerId\":\"<卖家ID>\",\"region\":\"NA|EU|FE|...\"}`  \n   响应需含 **`accessToken`**。\n\n2. **`POST ${LINKFOX_TOOL_GATEWAY}/spApi/developerProxy`**  \n   Body 字段（与 listings / pricing 系列一致）：\n   - **`region`**：与 storeTokens 相同。\n   - **`path`**：Amazon SP-API 相对 path，**无**前导 `/`。\n   - **`method`**：`GET` | `POST` | `PATCH`。\n   - **`amzAccessToken`**：上一步的 access token。\n   - **`queryString`**（可选）：URL 查询串，不含 `?`。\n   - **`body`**（POST/PATCH）：JSON 字符串。\n   - **`contentType`**：如 `application/json`。\n\n环境变量：\n\n- **`LINKFOX_AGENT_API_KEY`**（或 **`LINKFOXAGENT_API_KEY`**，必填）：网关鉴权。\n- **`LINKFOX_TOOL_GATEWAY`**（或 `STORE_API_BASE_URL` / `SPAPI_BASE_URL`，可选）：默认 `https://tool-gateway.linkfox.com`。\n\n---\n\n## 2. 脚本与 path / method 对照\n\n| 脚本 | method | path 模板 |\n|------|--------|-----------|\n| `search_orders.py` | GET | `orders/2026-01-01/orders` |\n| `get_order.py` | GET | `orders/2026-01-01/orders/{orderId}` |\n| `get_order_buyer_info.py` | GET | `orders/v0/orders/{orderId}/buyerInfo` |\n| `get_order_address.py` | GET | `orders/v0/orders/{orderId}/address` |\n| `get_order_items.py` | GET | `orders/v0/orders/{orderId}/orderItems` |\n| `get_order_items_buyer_info.py` | GET | `orders/v0/orders/{orderId}/orderItems/buyerInfo` |\n| `update_shipment_status.py` | POST | `orders/v0/orders/{orderId}/shipment` |\n| `get_order_regulated_info.py` | GET | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `update_verification_status.py` | PATCH | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `confirm_shipment.py` | POST | `orders/v0/orders/{orderId}/shipmentConfirmation` |\n\n`orderId` 在 path 中经 **percent-encoding**（与 listings SKU 处理一致）。\n\n---\n\n## 3. 各脚本 JSON 入参\n\n### 3.1 公共字段\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| sellerId | string | 是 | 卖家 ID |\n| region | string | 是 | NA / EU / FE 等与 auth 一致 |\n| skipDepCheck | boolean | 否 | 为 true 时跳过本地依赖探测 |\n\n### 3.2 `search_orders.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| marketplaceIds | string[] | 是 | 站点 ID 列表，长度 ≤ 50（以 Amazon 为准） |\n| createdAfter | string | 条件 | ISO 8601；与 `lastUpdatedAfter` **二选一** |\n| createdBefore | string | 否 | 与 `createdAfter` 同组使用 |\n| lastUpdatedAfter | string | 条件 | ISO 8601；与 `createdAfter` **二选一** |\n| lastUpdatedBefore | string | 否 | 与 `lastUpdatedAfter` 同组使用 |\n| fulfillmentStatuses | string[] | 否 | 如 PENDING、UNSHIPPED、SHIPPED、CANCELLED 等 |\n| fulfilledBy | string[] | 否 | MERCHANT、AMAZON |\n| maxResultsPerPage | number | 否 | 1～100，默认 100 |\n| paginationToken | string | 否 | 上一页响应 **`nextToken`** |\n| includedData | string[] | 否 | BUYER、RECIPIENT、PROCEEDS、FULFILLMENT、PACKAGES 等（见 [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders)） |\n\n脚本会在 stdout 的 JSON 中解析 **`searchOrders`**（当 `developerProxy.errcode==200` 且 `httpStatus==200` 时由 `body` JSON 解析）。\n\n### 3.3 `get_order.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | 亚马逊订单号 |\n| includedData | string[] | 否 | 同官方 `includedData` |\n\n解析字段：**`order`**。\n\n### 3.4 `get_order_buyer_info.py` / `get_order_address.py`\n\n| 字段 | 类型 | 必填 |\n|------|------|------|\n| orderId | string | 是 |\n\n解析字段：**`buyerInfo`** / **`shippingAddress`**（以实际 JSON 为准）。\n\n### 3.5 `get_order_items.py` / `get_order_items_buyer_info.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| nextToken | string | 否 | 映射为查询参数 **`NextToken`** |\n\n解析字段：**`orderItems`** / **`orderItemsBuyerInfo`**。\n\n### 3.6 `update_shipment_status.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| marketplaceId | string | 是 | |\n| shipmentStatus | string | 是 | ReadyForPickup、PickedUp、RefusedPickup |\n| orderItems | object[] | 否 | 部分更新时的行项目 |\n\n成功时 Amazon 常返回 **HTTP 204**，stdout 中 **`developerProxy`** 含状态即可，未必有 JSON body。\n\n### 3.7 `get_order_regulated_info.py`\n\n仅需 **`orderId`**。解析字段：**`regulatedOrder`**。\n\n### 3.8 `update_verification_status.py`\n\n| 方式 | 说明 |\n|------|------|\n| `regulatedOrderVerificationStatus` | 对象，脚本包装为 `{ \"regulatedOrderVerificationStatus\": ... }` |\n| `requestBody` | 整包 PATCH body 对象 |\n\n成功可能为 **204**。\n\n### 3.9 `confirm_shipment.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| requestBody | object | 是 | 与官方 **confirmShipment** schema 一致 |\n\n成功可能为 **204**。\n\n---\n\n## 4. 响应与错误\n\n- 脚本统一输出 JSON：`developerProxy` 为网关原样；部分脚本增加 **`resolvedPath`**、**`queryString`**、**`requestBody`**。\n- 优先阅读 **`developerProxy.errcode`**、**`developerProxy.httpStatus`**，再读 **`developerProxy.body`**（常为 Amazon 错误 JSON）。\n- **429**：需降频重试；searchOrders 默认速率较低。\n\n---\n\n## 5. 受限数据与 deprecated\n\n- **getOrderBuyerInfo / getOrderAddress / getOrderItems / getOrderItemsBuyerInfo** 在官方文档中标记为 **deprecated**；敏感数据需 **RDT** 与数据保护策略，见 [Tokens API](https://developer-docs.amazon.com/sp-api/reference/createrestricteddatatoken) 与 Orders 文档说明。\n- **getOrderRegulatedInfo** 的 `Accept` 等头若需特化，取决于网关是否支持透传；当前脚本未附加额外 Amazon 请求头。\n\n---\n\n## 6. Feedback\n\n若需反馈本 skill 问题，请在工单或内部渠道注明 **`skillName`: `linkfox-amazon-store-orders`**，并附上 `developerProxy` 完整 JSON（注意脱敏）。\n\nFile v1.0.4:skill-card.md\n\n## Description: <br>\nHelps agents search Amazon seller orders, inspect order, buyer, address, item, and regulated-order details, and submit shipment or verification status updates through LinkFox and Amazon SP-API. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[linkfox-ai](https://clawhub.ai/user/linkfox-ai) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal Amazon sellers, operations teams, and developers use this skill to retrieve order data and manage shipment or regulated-order verification workflows. It is intended for legitimate Amazon seller operations with appropriate LinkFox and Amazon permissions. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can access sensitive buyer, address, order-item, and regulated-order data. <br>\nMitigation: Use only in trusted workspaces with legitimate Amazon seller operations needs, appropriate Amazon permissions, and minimal access to the LinkFox API key. <br>\nRisk: Full responses are saved locally by default and --inline can expose PII in stdout or agent context. <br>\nMitigation: Avoid --inline for PII-bearing endpoints, inspect only needed fields, and delete saved linkfox response files when they are no longer required. <br>\nRisk: Shipment and regulated-order verification scripts can change order state. <br>\nMitigation: Require clear human confirmation and review of request bodies before running shipment confirmation, shipment status, or verification update scripts. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/linkfox-ai/skills/linkfox-amazon-store-orders) <br>\n- [Publisher profile](https://clawhub.ai/user/linkfox-ai) <br>\n- [references/api.md](references/api.md) <br>\n- [Amazon SP-API searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders) <br>\n- [Amazon SP-API getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3) <br>\n- [Amazon SP-API updateShipmentStatus](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus) <br>\n- [Amazon SP-API confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment) <br>\n- [Amazon SP-API updateVerificationStatus](https://developer-docs.amazon.com/sp-api/reference/updateverificationstatus) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance, JSON] <br>\n**Output Format:** [Markdown guidance with shell commands and JSON API responses saved to files or printed to stdout.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Scripts save full LinkFox responses under ./linkfox/<date>/<session>/data by default; --inline can print full responses to stdout.] <br>\n\n## Skill Version(s): <br>\n1.0.4 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.3: 16 files, 27098 bytes\n\nFiles: references/api.md (6182b), scripts/_spapi_orders_common.py (10560b), scripts/check_auth_dependency.py (6077b), scripts/confirm_shipment.py (2369b), scripts/get_order_address.py (1945b), scripts/get_order_buyer_info.py (1967b), scripts/get_order_items_buyer_info.py (2161b), scripts/get_order_items.py (2091b), scripts/get_order_regulated_info.py (1931b), scripts/get_order.py (2710b), scripts/search_orders.py (4549b), scripts/update_shipment_status.py (3194b), scripts/update_verification_status.py (2747b), skill-card.md (3281b), SKILL.md (7546b), _meta.json (146b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: linkfox-amazon-store-orders\ndescription: 亚马逊店铺订单（与 linkfox-amazon-store-auth / report / listings / pricing 同系列），经 /spApi/developerProxy 调用 SP-API Orders：v2026-01-01 的 searchOrders、getOrder；v0 的 getOrderBuyerInfo、getOrderAddress、getOrderItems、getOrderItemsBuyerInfo、updateShipmentStatus、getOrderRegulatedInfo、updateVerificationStatus、confirmShipment。当用户提到亚马逊订单、searchOrders、getOrder、订单列表、订单详情、买家信息、收货地址、订单行、发货确认、管制订单、核验状态、Orders API、SP-API 订单 时触发。\n---\n\n# Amazon 店铺 Orders\n\n本 skill 与 **`linkfox-amazon-store-auth`**、**`linkfox-amazon-store-report`**、**`linkfox-amazon-store-listings`**、**`linkfox-amazon-store-pricing`** 同属 **Amazon Store** 系列：先 **`POST /spApi/storeTokens`** 取 **`accessToken`**，再 **`POST /spApi/developerProxy`** 转发上游 **`GET` / `POST` / `PATCH`**。\n\n## 调用方式\n\n- **API 端点**：`POST /spApi/developerProxy`（不同 SP-API 操作通过 path/method 区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-orders-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 官方参考索引\n\n| 能力 | 文档 |\n|------|------|\n| searchOrders | [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders) |\n| getOrder (v2026-01-01) | [getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3) |\n| getOrderBuyerInfo (deprecated) | [getOrderBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderbuyerinfo) |\n| getOrderAddress (deprecated) | [getOrderAddress](https://developer-docs.amazon.com/sp-api/reference/getorderaddress) |\n| getOrderItems (deprecated) | [getOrderItems](https://developer-docs.amazon.com/sp-api/reference/getorderitems) |\n| getOrderItemsBuyerInfo (deprecated) | [getOrderItemsBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderitemsbuyerinfo) |\n| updateShipmentStatus | [updateShipmentStatus](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus) |\n| getOrderRegulatedInfo | [getOrderRegulatedInfo](https://developer-docs.amazon.com/sp-api/reference/getorderregulatedinfo) |\n| updateVerificationStatus | [updateVerificationStatus](https://developer-docs.amazon.com/sp-api/reference/updateverificationstatus) |\n| confirmShipment | [confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment) |\n\n---\n\n## Prerequisites（必须先读）\n\n本 skill **依赖** **`linkfox-amazon-store-auth`**。\n\n1. 运行 `python scripts/check_auth_dependency.py`；若 exit code **42** 且 stderr 含 `DEPENDENCY_MISSING:`，请先安装 **`linkfox-amazon-store-auth`**。\n2. **不要**在本 skill 内绕过依赖实现授权或令牌逻辑。\n\n---\n\n## Current Capabilities（脚本一览）\n\n| 能力 | developerProxy `path`（要点） | 脚本 |\n|------|------------------------------|------|\n| searchOrders | `orders/2026-01-01/orders` + Query | `search_orders.py` |\n| getOrder | `orders/2026-01-01/orders/{orderId}` + Query | `get_order.py` |\n| getOrderBuyerInfo | `orders/v0/orders/{orderId}/buyerInfo` | `get_order_buyer_info.py` |\n| getOrderAddress | `orders/v0/orders/{orderId}/address` | `get_order_address.py` |\n| getOrderItems | `orders/v0/orders/{orderId}/orderItems` + NextToken | `get_order_items.py` |\n| getOrderItemsBuyerInfo | `orders/v0/orders/{orderId}/orderItems/buyerInfo` | `get_order_items_buyer_info.py` |\n| updateShipmentStatus | `orders/v0/orders/{orderId}/shipment`，POST JSON | `update_shipment_status.py` |\n| getOrderRegulatedInfo | `orders/v0/orders/{orderId}/regulatedInfo` | `get_order_regulated_info.py` |\n| updateVerificationStatus | `orders/v0/orders/{orderId}/regulatedInfo`，PATCH JSON | `update_verification_status.py` |\n| confirmShipment | `orders/v0/orders/{orderId}/shipmentConfirmation`，POST JSON | `confirm_shipment.py` |\n\n共享逻辑见 **`scripts/_spapi_orders_common.py`**（仅供同目录脚本 import，非独立 CLI）。\n\n---\n\n## Quick Parameters（摘要）\n\n- **searchOrders**：`createdAfter` **或** `lastUpdatedAfter`（二选一）；`marketplaceIds`；可选 `fulfillmentStatuses`、`fulfilledBy`、`maxResultsPerPage`、`paginationToken`（上一页 **`nextToken`**）、`includedData`。\n- **getOrder**：`orderId`；可选 **`includedData`**（如 BUYER、FULFILLMENT、PACKAGES）。\n- **getOrderItems / getOrderItemsBuyerInfo**：可选 **`nextToken`** → 查询参数 `NextToken`。\n- **updateShipmentStatus**：`marketplaceId`、`shipmentStatus`（ReadyForPickup / PickedUp / RefusedPickup）；可选 **`orderItems`**。\n- **updateVerificationStatus**：传 **`regulatedOrderVerificationStatus`** 对象，或整包 **`requestBody`**。\n- **confirmShipment**：**`requestBody`** 为官方要求的完整对象（通常含 **`packageDetail`** 等）。\n\n---\n\n## Scripts\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/search_orders.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"lastUpdatedAfter\":\"2026-05-01T00:00:00Z\"}'\n\npython scripts/get_order.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"orderId\":\"123-1234567-1234567\",\"includedData\":[\"FULFILLMENT\",\"PACKAGES\"]}'\n```\n\n---\n\n## Display Rules\n\n1. 先看网关 **`developerProxy.errcode` / `httpStatus`**，再解析各脚本附加字段（如 **`searchOrders`**、**`order`**）。\n2. **POST/PATCH** 脚本：`stdout` 中含 **`requestBody`**（组装后的 Amazon 请求体），便于排查。\n3. **v0 买家/地址/行项目** 接口在官方文档中为 **deprecated**；新集成优先用 **v2026-01-01** 的 **searchOrders / getOrder** 与 **`includedData`** 拉齐业务字段。\n4. **searchOrders** 默认速率较低（官方约 **0.0056 req/s**），注意 **429**。\n5. 受限 PII / RDT 以 Amazon 数据保护政策为准；详见 **`references/api.md`**。\n\n---\n\n## Important Limitations\n\n- 权限：**Orders** 及相关角色；部分读取可能需 **Restricted Data Token**，不在本 skill 内实现。\n- **路径白名单**：若网关返回 **1005** 等拒绝转发，需后端放行 **`orders/v0/...`** 与 **`orders/2026-01-01/...`** 前缀。\n- 返回结构以 Amazon schema 为准；详见 **`references/api.md`**。\n\n**Feedback：** 见 `references/api.md`，`skillName`：`linkfox-amazon-store-orders`。\n\n---\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-orders\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1783066333528\n}\n\nFile v1.0.3:references/api.md\n\n# linkfox-amazon-store-orders — API 与网关调用说明\n\n## 1. 调用链\n\n1. **`POST ${LINKFOX_TOOL_GATEWAY}/spApi/storeTokens`**  \n   Body: `{\"sellerId\":\"<卖家ID>\",\"region\":\"NA|EU|FE|...\"}`  \n   响应需含 **`accessToken`**。\n\n2. **`POST ${LINKFOX_TOOL_GATEWAY}/spApi/developerProxy`**  \n   Body 字段（与 listings / pricing 系列一致）：\n   - **`region`**：与 storeTokens 相同。\n   - **`path`**：Amazon SP-API 相对 path，**无**前导 `/`。\n   - **`method`**：`GET` | `POST` | `PATCH`。\n   - **`amzAccessToken`**：上一步的 access token。\n   - **`queryString`**（可选）：URL 查询串，不含 `?`。\n   - **`body`**（POST/PATCH）：JSON 字符串。\n   - **`contentType`**：如 `application/json`。\n\n环境变量：\n\n- **`LINKFOX_AGENT_API_KEY`**（或 **`LINKFOXAGENT_API_KEY`**，必填）：网关鉴权。\n- **`LINKFOX_TOOL_GATEWAY`**（或 `STORE_API_BASE_URL` / `SPAPI_BASE_URL`，可选）：默认 `https://tool-gateway.linkfox.com`。\n\n---\n\n## 2. 脚本与 path / method 对照\n\n| 脚本 | method | path 模板 |\n|------|--------|-----------|\n| `search_orders.py` | GET | `orders/2026-01-01/orders` |\n| `get_order.py` | GET | `orders/2026-01-01/orders/{orderId}` |\n| `get_order_buyer_info.py` | GET | `orders/v0/orders/{orderId}/buyerInfo` |\n| `get_order_address.py` | GET | `orders/v0/orders/{orderId}/address` |\n| `get_order_items.py` | GET | `orders/v0/orders/{orderId}/orderItems` |\n| `get_order_items_buyer_info.py` | GET | `orders/v0/orders/{orderId}/orderItems/buyerInfo` |\n| `update_shipment_status.py` | POST | `orders/v0/orders/{orderId}/shipment` |\n| `get_order_regulated_info.py` | GET | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `update_verification_status.py` | PATCH | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `confirm_shipment.py` | POST | `orders/v0/orders/{orderId}/shipmentConfirmation` |\n\n`orderId` 在 path 中经 **percent-encoding**（与 listings SKU 处理一致）。\n\n---\n\n## 3. 各脚本 JSON 入参\n\n### 3.1 公共字段\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| sellerId | string | 是 | 卖家 ID |\n| region | string | 是 | NA / EU / FE 等与 auth 一致 |\n| skipDepCheck | boolean | 否 | 为 true 时跳过本地依赖探测 |\n\n### 3.2 `search_orders.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| marketplaceIds | string[] | 是 | 站点 ID 列表，长度 ≤ 50（以 Amazon 为准） |\n| createdAfter | string | 条件 | ISO 8601；与 `lastUpdatedAfter` **二选一** |\n| createdBefore | string | 否 | 与 `createdAfter` 同组使用 |\n| lastUpdatedAfter | string | 条件 | ISO 8601；与 `createdAfter` **二选一** |\n| lastUpdatedBefore | string | 否 | 与 `lastUpdatedAfter` 同组使用 |\n| fulfillmentStatuses | string[] | 否 | 如 PENDING、UNSHIPPED、SHIPPED、CANCELLED 等 |\n| fulfilledBy | string[] | 否 | MERCHANT、AMAZON |\n| maxResultsPerPage | number | 否 | 1～100，默认 100 |\n| paginationToken | string | 否 | 上一页响应 **`nextToken`** |\n| includedData | string[] | 否 | BUYER、RECIPIENT、PROCEEDS、FULFILLMENT、PACKAGES 等（见 [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders)） |\n\n脚本会在 stdout 的 JSON 中解析 **`searchOrders`**（当 `developerProxy.errcode==200` 且 `httpStatus==200` 时由 `body` JSON 解析）。\n\n### 3.3 `get_order.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | 亚马逊订单号 |\n| includedData | string[] | 否 | 同官方 `includedData` |\n\n解析字段：**`order`**。\n\n### 3.4 `get_order_buyer_info.py` / `get_order_address.py`\n\n| 字段 | 类型 | 必填 |\n|------|------|------|\n| orderId | string | 是 |\n\n解析字段：**`buyerInfo`** / **`shippingAddress`**（以实际 JSON 为准）。\n\n### 3.5 `get_order_items.py` / `get_order_items_buyer_info.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| nextToken | string | 否 | 映射为查询参数 **`NextToken`** |\n\n解析字段：**`orderItems`** / **`orderItemsBuyerInfo`**。\n\n### 3.6 `update_shipment_status.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| marketplaceId | string | 是 | |\n| shipmentStatus | string | 是 | ReadyForPickup、PickedUp、RefusedPickup |\n| orderItems | object[] | 否 | 部分更新时的行项目 |\n\n成功时 Amazon 常返回 **HTTP 204**，stdout 中 **`developerProxy`** 含状态即可，未必有 JSON body。\n\n### 3.7 `get_order_regulated_info.py`\n\n仅需 **`orderId`**。解析字段：**`regulatedOrder`**。\n\n### 3.8 `update_verification_status.py`\n\n| 方式 | 说明 |\n|------|------|\n| `regulatedOrderVerificationStatus` | 对象，脚本包装为 `{ \"regulatedOrderVerificationStatus\": ... }` |\n| `requestBody` | 整包 PATCH body 对象 |\n\n成功可能为 **204**。\n\n### 3.9 `confirm_shipment.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| requestBody | object | 是 | 与官方 **confirmShipment** schema 一致 |\n\n成功可能为 **204**。\n\n---\n\n## 4. 响应与错误\n\n- 脚本统一输出 JSON：`developerProxy` 为网关原样；部分脚本增加 **`resolvedPath`**、**`queryString`**、**`requestBody`**。\n- 优先阅读 **`developerProxy.errcode`**、**`developerProxy.httpStatus`**，再读 **`developerProxy.body`**（常为 Amazon 错误 JSON）。\n- **429**：需降频重试；searchOrders 默认速率较低。\n\n---\n\n## 5. 受限数据与 deprecated\n\n- **getOrderBuyerInfo / getOrderAddress / getOrderItems / getOrderItemsBuyerInfo** 在官方文档中标记为 **deprecated**；敏感数据需 **RDT** 与数据保护策略，见 [Tokens API](https://developer-docs.amazon.com/sp-api/reference/createrestricteddatatoken) 与 Orders 文档说明。\n- **getOrderRegulatedInfo** 的 `Accept` 等头若需特化，取决于网关是否支持透传；当前脚本未附加额外 Amazon 请求头。\n\n---\n\n## 6. Feedback\n\n若需反馈本 skill 问题，请在工单或内部渠道注明 **`skillName`: `linkfox-amazon-store-orders`**，并附上 `developerProxy` 完整 JSON（注意脱敏）。\n\nFile v1.0.3:skill-card.md\n\n## Description: <br>\nAmazon Store Orders helps agents call LinkFox's SP-API developer proxy to search Amazon orders, retrieve order details, buyer/address/item/regulated-order data, and update shipment or verification status. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[linkfox-ai](https://clawhub.ai/user/linkfox-ai) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal developers and operators use this skill to manage Amazon Store order workflows through LinkFox gateway scripts, including order search, order detail retrieval, shipment confirmation, shipment status updates, and regulated-order verification updates. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Full Amazon order, buyer, address, regulated-order, and shipment data is saved locally by default and may be printed in full when inline output is requested. <br>\nMitigation: Run the skill only in a controlled workspace, avoid inline output for sensitive responses, and delete saved LinkFox session data when it is no longer needed. <br>\nRisk: Shipment confirmation, shipment-status update, and verification-status update scripts can change Amazon order state without a built-in confirmation step. <br>\nMitigation: Require explicit human review of the target order, operation, and request body before running any state-changing script. <br>\nRisk: Some order, buyer, address, item, or regulated-order data may require Amazon Restricted Data Token handling and appropriate Orders permissions. <br>\nMitigation: Use credentials with the minimum required roles and confirm Restricted Data Token and Amazon data-protection requirements outside this skill before accessing restricted data. <br>\n\n\n## Reference(s): <br>\n- [Artifact API and gateway reference](artifact/references/api.md) <br>\n- [Amazon SP-API searchOrders reference](https://developer-docs.amazon.com/sp-api/reference/searchorders) <br>\n- [Amazon SP-API getOrder reference](https://developer-docs.amazon.com/sp-api/reference/getorder-3) <br>\n- [Amazon SP-API updateShipmentStatus reference](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus) <br>\n- [Amazon SP-API confirmShipment reference](https://developer-docs.amazon.com/sp-api/reference/confirmshipment) <br>\n- [Amazon SP-API createRestrictedDataToken reference](https://developer-docs.amazon.com/sp-api/reference/createrestricteddatatoken) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, code, shell commands, configuration, JSON files, guidance] <br>\n**Output Format:** [Markdown guidance with shell commands and JSON request/response data saved to local files] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Scripts require LinkFox API credentials and Amazon seller, region, marketplace, order, or request-body parameters depending on the operation.] <br>\n\n## Skill Version(s): <br>\n1.0.3 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.2: 15 files, 25605 bytes\n\nFiles: references/api.md (6185b), scripts/_spapi_orders_common.py (10561b), scripts/check_auth_dependency.py (6077b), scripts/confirm_shipment.py (2369b), scripts/get_order_address.py (1945b), scripts/get_order_buyer_info.py (1967b), scripts/get_order_items_buyer_info.py (2161b), scripts/get_order_items.py (2091b), scripts/get_order_regulated_info.py (1931b), scripts/get_order.py (2710b), scripts/search_orders.py (4549b), scripts/update_shipment_status.py (3194b), scripts/update_verification_status.py (2747b), SKILL.md (7546b), _meta.json (146b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: linkfox-amazon-store-orders\ndescription: 亚马逊店铺订单（与 linkfox-amazon-store-auth / report / listings / pricing 同系列），经 /spApi/developerProxy 调用 SP-API Orders：v2026-01-01 的 searchOrders、getOrder；v0 的 getOrderBuyerInfo、getOrderAddress、getOrderItems、getOrderItemsBuyerInfo、updateShipmentStatus、getOrderRegulatedInfo、updateVerificationStatus、confirmShipment。当用户提到亚马逊订单、searchOrders、getOrder、订单列表、订单详情、买家信息、收货地址、订单行、发货确认、管制订单、核验状态、Orders API、SP-API 订单 时触发。\n---\n\n# Amazon 店铺 Orders\n\n本 skill 与 **`linkfox-amazon-store-auth`**、**`linkfox-amazon-store-report`**、**`linkfox-amazon-store-listings`**、**`linkfox-amazon-store-pricing`** 同属 **Amazon Store** 系列：先 **`POST /spApi/storeTokens`** 取 **`accessToken`**，再 **`POST /spApi/developerProxy`** 转发上游 **`GET` / `POST` / `PATCH`**。\n\n## 调用方式\n\n- **API 端点**：`POST /spApi/developerProxy`（不同 SP-API 操作通过 path/method 区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-orders-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 官方参考索引\n\n| 能力 | 文档 |\n|------|------|\n| searchOrders | [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders) |\n| getOrder (v2026-01-01) | [getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3) |\n| getOrderBuyerInfo (deprecated) | [getOrderBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderbuyerinfo) |\n| getOrderAddress (deprecated) | [getOrderAddress](https://developer-docs.amazon.com/sp-api/reference/getorderaddress) |\n| getOrderItems (deprecated) | [getOrderItems](https://developer-docs.amazon.com/sp-api/reference/getorderitems) |\n| getOrderItemsBuyerInfo (deprecated) | [getOrderItemsBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderitemsbuyerinfo) |\n| updateShipmentStatus | [updateShipmentStatus](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus) |\n| getOrderRegulatedInfo | [getOrderRegulatedInfo](https://developer-docs.amazon.com/sp-api/reference/getorderregulatedinfo) |\n| updateVerificationStatus | [updateVerificationStatus](https://developer-docs.amazon.com/sp-api/reference/updateverificationstatus) |\n| confirmShipment | [confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment) |\n\n---\n\n## Prerequisites（必须先读）\n\n本 skill **依赖** **`linkfox-amazon-store-auth`**。\n\n1. 运行 `python scripts/check_auth_dependency.py`；若 exit code **42** 且 stderr 含 `DEPENDENCY_MISSING:`，请先安装 **`linkfox-amazon-store-auth`**。\n2. **不要**在本 skill 内绕过依赖实现授权或令牌逻辑。\n\n---\n\n## Current Capabilities（脚本一览）\n\n| 能力 | developerProxy `path`（要点） | 脚本 |\n|------|------------------------------|------|\n| searchOrders | `orders/2026-01-01/orders` + Query | `search_orders.py` |\n| getOrder | `orders/2026-01-01/orders/{orderId}` + Query | `get_order.py` |\n| getOrderBuyerInfo | `orders/v0/orders/{orderId}/buyerInfo` | `get_order_buyer_info.py` |\n| getOrderAddress | `orders/v0/orders/{orderId}/address` | `get_order_address.py` |\n| getOrderItems | `orders/v0/orders/{orderId}/orderItems` + NextToken | `get_order_items.py` |\n| getOrderItemsBuyerInfo | `orders/v0/orders/{orderId}/orderItems/buyerInfo` | `get_order_items_buyer_info.py` |\n| updateShipmentStatus | `orders/v0/orders/{orderId}/shipment`，POST JSON | `update_shipment_status.py` |\n| getOrderRegulatedInfo | `orders/v0/orders/{orderId}/regulatedInfo` | `get_order_regulated_info.py` |\n| updateVerificationStatus | `orders/v0/orders/{orderId}/regulatedInfo`，PATCH JSON | `update_verification_status.py` |\n| confirmShipment | `orders/v0/orders/{orderId}/shipmentConfirmation`，POST JSON | `confirm_shipment.py` |\n\n共享逻辑见 **`scripts/_spapi_orders_common.py`**（仅供同目录脚本 import，非独立 CLI）。\n\n---\n\n## Quick Parameters（摘要）\n\n- **searchOrders**：`createdAfter` **或** `lastUpdatedAfter`（二选一）；`marketplaceIds`；可选 `fulfillmentStatuses`、`fulfilledBy`、`maxResultsPerPage`、`paginationToken`（上一页 **`nextToken`**）、`includedData`。\n- **getOrder**：`orderId`；可选 **`includedData`**（如 BUYER、FULFILLMENT、PACKAGES）。\n- **getOrderItems / getOrderItemsBuyerInfo**：可选 **`nextToken`** → 查询参数 `NextToken`。\n- **updateShipmentStatus**：`marketplaceId`、`shipmentStatus`（ReadyForPickup / PickedUp / RefusedPickup）；可选 **`orderItems`**。\n- **updateVerificationStatus**：传 **`regulatedOrderVerificationStatus`** 对象，或整包 **`requestBody`**。\n- **confirmShipment**：**`requestBody`** 为官方要求的完整对象（通常含 **`packageDetail`** 等）。\n\n---\n\n## Scripts\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/search_orders.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"lastUpdatedAfter\":\"2026-05-01T00:00:00Z\"}'\n\npython scripts/get_order.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"orderId\":\"123-1234567-1234567\",\"includedData\":[\"FULFILLMENT\",\"PACKAGES\"]}'\n```\n\n---\n\n## Display Rules\n\n1. 先看网关 **`developerProxy.errcode` / `httpStatus`**，再解析各脚本附加字段（如 **`searchOrders`**、**`order`**）。\n2. **POST/PATCH** 脚本：`stdout` 中含 **`requestBody`**（组装后的 Amazon 请求体），便于排查。\n3. **v0 买家/地址/行项目** 接口在官方文档中为 **deprecated**；新集成优先用 **v2026-01-01** 的 **searchOrders / getOrder** 与 **`includedData`** 拉齐业务字段。\n4. **searchOrders** 默认速率较低（官方约 **0.0056 req/s**），注意 **429**。\n5. 受限 PII / RDT 以 Amazon 数据保护政策为准；详见 **`references/api.md`**。\n\n---\n\n## Important Limitations\n\n- 权限：**Orders** 及相关角色；部分读取可能需 **Restricted Data Token**，不在本 skill 内实现。\n- **路径白名单**：若网关返回 **1005** 等拒绝转发，需后端放行 **`orders/v0/...`** 与 **`orders/2026-01-01/...`** 前缀。\n- 返回结构以 Amazon schema 为准；详见 **`references/api.md`**。\n\n**Feedback：** 见 `references/api.md`，`skillName`：`linkfox-amazon-store-orders`。\n\n---\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-orders\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1783053440320\n}\n\nFile v1.0.2:references/api.md\n\n# linkfox-amazon-store-orders — API 与网关调用说明\n\n## 1. 调用链\n\n1. **`POST ${LINKFOX_AGENT_API_URL}/spApi/storeTokens`**  \n   Body: `{\"sellerId\":\"<卖家ID>\",\"region\":\"NA|EU|FE|...\"}`  \n   响应需含 **`accessToken`**。\n\n2. **`POST ${LINKFOX_AGENT_API_URL}/spApi/developerProxy`**  \n   Body 字段（与 listings / pricing 系列一致）：\n   - **`region`**：与 storeTokens 相同。\n   - **`path`**：Amazon SP-API 相对 path，**无**前导 `/`。\n   - **`method`**：`GET` | `POST` | `PATCH`。\n   - **`amzAccessToken`**：上一步的 access token。\n   - **`queryString`**（可选）：URL 查询串，不含 `?`。\n   - **`body`**（POST/PATCH）：JSON 字符串。\n   - **`contentType`**：如 `application/json`。\n\n环境变量：\n\n- **`LINKFOX_AGENT_API_KEY`**（或 **`LINKFOXAGENT_API_KEY`**，必填）：网关鉴权。\n- **`LINKFOX_AGENT_API_URL`**（或 `STORE_API_BASE_URL` / `SPAPI_BASE_URL`，可选）：默认 `https://tool-gateway.linkfox.com`。\n\n---\n\n## 2. 脚本与 path / method 对照\n\n| 脚本 | method | path 模板 |\n|------|--------|-----------|\n| `search_orders.py` | GET | `orders/2026-01-01/orders` |\n| `get_order.py` | GET | `orders/2026-01-01/orders/{orderId}` |\n| `get_order_buyer_info.py` | GET | `orders/v0/orders/{orderId}/buyerInfo` |\n| `get_order_address.py` | GET | `orders/v0/orders/{orderId}/address` |\n| `get_order_items.py` | GET | `orders/v0/orders/{orderId}/orderItems` |\n| `get_order_items_buyer_info.py` | GET | `orders/v0/orders/{orderId}/orderItems/buyerInfo` |\n| `update_shipment_status.py` | POST | `orders/v0/orders/{orderId}/shipment` |\n| `get_order_regulated_info.py` | GET | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `update_verification_status.py` | PATCH | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `confirm_shipment.py` | POST | `orders/v0/orders/{orderId}/shipmentConfirmation` |\n\n`orderId` 在 path 中经 **percent-encoding**（与 listings SKU 处理一致）。\n\n---\n\n## 3. 各脚本 JSON 入参\n\n### 3.1 公共字段\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| sellerId | string | 是 | 卖家 ID |\n| region | string | 是 | NA / EU / FE 等与 auth 一致 |\n| skipDepCheck | boolean | 否 | 为 true 时跳过本地依赖探测 |\n\n### 3.2 `search_orders.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| marketplaceIds | string[] | 是 | 站点 ID 列表，长度 ≤ 50（以 Amazon 为准） |\n| createdAfter | string | 条件 | ISO 8601；与 `lastUpdatedAfter` **二选一** |\n| createdBefore | string | 否 | 与 `createdAfter` 同组使用 |\n| lastUpdatedAfter | string | 条件 | ISO 8601；与 `createdAfter` **二选一** |\n| lastUpdatedBefore | string | 否 | 与 `lastUpdatedAfter` 同组使用 |\n| fulfillmentStatuses | string[] | 否 | 如 PENDING、UNSHIPPED、SHIPPED、CANCELLED 等 |\n| fulfilledBy | string[] | 否 | MERCHANT、AMAZON |\n| maxResultsPerPage | number | 否 | 1～100，默认 100 |\n| paginationToken | string | 否 | 上一页响应 **`nextToken`** |\n| includedData | string[] | 否 | BUYER、RECIPIENT、PROCEEDS、FULFILLMENT、PACKAGES 等（见 [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders)） |\n\n脚本会在 stdout 的 JSON 中解析 **`searchOrders`**（当 `developerProxy.errcode==200` 且 `httpStatus==200` 时由 `body` JSON 解析）。\n\n### 3.3 `get_order.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | 亚马逊订单号 |\n| includedData | string[] | 否 | 同官方 `includedData` |\n\n解析字段：**`order`**。\n\n### 3.4 `get_order_buyer_info.py` / `get_order_address.py`\n\n| 字段 | 类型 | 必填 |\n|------|------|------|\n| orderId | string | 是 |\n\n解析字段：**`buyerInfo`** / **`shippingAddress`**（以实际 JSON 为准）。\n\n### 3.5 `get_order_items.py` / `get_order_items_buyer_info.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| nextToken | string | 否 | 映射为查询参数 **`NextToken`** |\n\n解析字段：**`orderItems`** / **`orderItemsBuyerInfo`**。\n\n### 3.6 `update_shipment_status.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| marketplaceId | string | 是 | |\n| shipmentStatus | string | 是 | ReadyForPickup、PickedUp、RefusedPickup |\n| orderItems | object[] | 否 | 部分更新时的行项目 |\n\n成功时 Amazon 常返回 **HTTP 204**，stdout 中 **`developerProxy`** 含状态即可，未必有 JSON body。\n\n### 3.7 `get_order_regulated_info.py`\n\n仅需 **`orderId`**。解析字段：**`regulatedOrder`**。\n\n### 3.8 `update_verification_status.py`\n\n| 方式 | 说明 |\n|------|------|\n| `regulatedOrderVerificationStatus` | 对象，脚本包装为 `{ \"regulatedOrderVerificationStatus\": ... }` |\n| `requestBody` | 整包 PATCH body 对象 |\n\n成功可能为 **204**。\n\n### 3.9 `confirm_shipment.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| requestBody | object | 是 | 与官方 **confirmShipment** schema 一致 |\n\n成功可能为 **204**。\n\n---\n\n## 4. 响应与错误\n\n- 脚本统一输出 JSON：`developerProxy` 为网关原样；部分脚本增加 **`resolvedPath`**、**`queryString`**、**`requestBody`**。\n- 优先阅读 **`developerProxy.errcode`**、**`developerProxy.httpStatus`**，再读 **`developerProxy.body`**（常为 Amazon 错误 JSON）。\n- **429**：需降频重试；searchOrders 默认速率较低。\n\n---\n\n## 5. 受限数据与 deprecated\n\n- **getOrderBuyerInfo / getOrderAddress / getOrderItems / getOrderItemsBuyerInfo** 在官方文档中标记为 **deprecated**；敏感数据需 **RDT** 与数据保护策略，见 [Tokens API](https://developer-docs.amazon.com/sp-api/reference/createrestricteddatatoken) 与 Orders 文档说明。\n- **getOrderRegulatedInfo** 的 `Accept` 等头若需特化，取决于网关是否支持透传；当前脚本未附加额外 Amazon 请求头。\n\n---\n\n## 6. Feedback\n\n若需反馈本 skill 问题，请在工单或内部渠道注明 **`skillName`: `linkfox-amazon-store-orders`**，并附上 `developerProxy` 完整 JSON（注意脱敏）。\n\nArchive v1.0.1: 17 files, 31070 bytes\n\nFiles: references/api.md (6119b), scripts/_spapi_orders_common.py (4054b), scripts/check_auth_dependency.py (6077b), scripts/confirm_shipment.py (2330b), scripts/get_order_address.py (1906b), scripts/get_order_buyer_info.py (1928b), scripts/get_order_items_buyer_info.py (2122b), scripts/get_order_items.py (2052b), scripts/get_order_regulated_info.py (1892b), scripts/get_order.py (2671b), scripts/response_io.py (18387b), scripts/search_orders.py (4510b), scripts/update_shipment_status.py (3155b), scripts/update_verification_status.py (2708b), skill-card.md (3706b), SKILL.md (8023b), _meta.json (146b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: linkfox-amazon-store-orders\ndescription: 亚马逊店铺订单（与 linkfox-amazon-store-auth / report / listings / pricing 同系列），经 /spApi/developerProxy 调用 SP-API Orders：v2026-01-01 的 searchOrders、getOrder；v0 的 getOrderBuyerInfo、getOrderAddress、getOrderItems、getOrderItemsBuyerInfo、updateShipmentStatus、getOrderRegulatedInfo、updateVerificationStatus、confirmShipment。当用户提到亚马逊订单、searchOrders、getOrder、订单列表、订单详情、买家信息、收货地址、订单行、发货确认、管制订单、核验状态、Orders API、SP-API 订单 时触发。\n---\n\n# Amazon 店铺 Orders\n\n本 skill 与 **`linkfox-amazon-store-auth`**、**`linkfox-amazon-store-report`**、**`linkfox-amazon-store-listings`**、**`linkfox-amazon-store-pricing`** 同属 **Amazon Store** 系列：先 **`POST /spApi/storeTokens`** 取 **`accessToken`**，再 **`POST /spApi/developerProxy`** 转发上游 **`GET` / `POST` / `PATCH`**。\n\n## 官方参考索引\n\n| 能力 | 文档 |\n|------|------|\n| searchOrders | [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders) |\n| getOrder (v2026-01-01) | [getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3) |\n| getOrderBuyerInfo (deprecated) | [getOrderBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderbuyerinfo) |\n| getOrderAddress (deprecated) | [getOrderAddress](https://developer-docs.amazon.com/sp-api/reference/getorderaddress) |\n| getOrderItems (deprecated) | [getOrderItems](https://developer-docs.amazon.com/sp-api/reference/getorderitems) |\n| getOrderItemsBuyerInfo (deprecated) | [getOrderItemsBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderitemsbuyerinfo) |\n| updateShipmentStatus | [updateShipmentStatus](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus) |\n| getOrderRegulatedInfo | [getOrderRegulatedInfo](https://developer-docs.amazon.com/sp-api/reference/getorderregulatedinfo) |\n| updateVerificationStatus | [updateVerificationStatus](https://developer-docs.amazon.com/sp-api/reference/updateverificationstatus) |\n| confirmShipment | [confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment) |\n\n---\n\n## Prerequisites（必须先读）\n\n本 skill **依赖** **`linkfox-amazon-store-auth`**。\n\n1. 运行 `python scripts/check_auth_dependency.py`；若 exit code **42** 且 stderr 含 `DEPENDENCY_MISSING:`，请先安装 **`linkfox-amazon-store-auth`**。\n2. **不要**在本 skill 内绕过依赖实现授权或令牌逻辑。\n\n---\n\n## Current Capabilities（脚本一览）\n\n| 能力 | developerProxy `path`（要点） | 脚本 |\n|------|------------------------------|------|\n| searchOrders | `orders/2026-01-01/orders` + Query | `search_orders.py` |\n| getOrder | `orders/2026-01-01/orders/{orderId}` + Query | `get_order.py` |\n| getOrderBuyerInfo | `orders/v0/orders/{orderId}/buyerInfo` | `get_order_buyer_info.py` |\n| getOrderAddress | `orders/v0/orders/{orderId}/address` | `get_order_address.py` |\n| getOrderItems | `orders/v0/orders/{orderId}/orderItems` + NextToken | `get_order_items.py` |\n| getOrderItemsBuyerInfo | `orders/v0/orders/{orderId}/orderItems/buyerInfo` | `get_order_items_buyer_info.py` |\n| updateShipmentStatus | `orders/v0/orders/{orderId}/shipment`，POST JSON | `update_shipment_status.py` |\n| getOrderRegulatedInfo | `orders/v0/orders/{orderId}/regulatedInfo` | `get_order_regulated_info.py` |\n| updateVerificationStatus | `orders/v0/orders/{orderId}/regulatedInfo`，PATCH JSON | `update_verification_status.py` |\n| confirmShipment | `orders/v0/orders/{orderId}/shipmentConfirmation`，POST JSON | `confirm_shipment.py` |\n\n共享逻辑见 **`scripts/_spapi_orders_common.py`**（仅供同目录脚本 import，非独立 CLI）。\n\n---\n\n## Quick Parameters（摘要）\n\n- **searchOrders**：`createdAfter` **或** `lastUpdatedAfter`（二选一）；`marketplaceIds`；可选 `fulfillmentStatuses`、`fulfilledBy`、`maxResultsPerPage`、`paginationToken`（上一页 **`nextToken`**）、`includedData`。\n- **getOrder**：`orderId`；可选 **`includedData`**（如 BUYER、FULFILLMENT、PACKAGES）。\n- **getOrderItems / getOrderItemsBuyerInfo**：可选 **`nextToken`** → 查询参数 `NextToken`。\n- **updateShipmentStatus**：`marketplaceId`、`shipmentStatus`（ReadyForPickup / PickedUp / RefusedPickup）；可选 **`orderItems`**。\n- **updateVerificationStatus**：传 **`regulatedOrderVerificationStatus`** 对象，或整包 **`requestBody`**。\n- **confirmShipment**：**`requestBody`** 为官方要求的完整对象（通常含 **`packageDetail`** 等）。\n\n---\n\n## Scripts\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/search_orders.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"lastUpdatedAfter\":\"2026-05-01T00:00:00Z\"}'\n\npython scripts/get_order.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"orderId\":\"123-1234567-1234567\",\"includedData\":[\"FULFILLMENT\",\"PACKAGES\"]}'\n```\n\n---\n\n## Display Rules\n\n1. 先看网关 **`developerProxy.errcode` / `httpStatus`**，再解析各脚本附加字段（如 **`searchOrders`**、**`order`**）。\n2. **POST/PATCH** 脚本：`stdout` 中含 **`requestBody`**（组装后的 Amazon 请求体），便于排查。\n3. **v0 买家/地址/行项目** 接口在官方文档中为 **deprecated**；新集成优先用 **v2026-01-01** 的 **searchOrders / getOrder** 与 **`includedData`** 拉齐业务字段。\n4. **searchOrders** 默认速率较低（官方约 **0.0056 req/s**），注意 **429**。\n5. 受限 PII / RDT 以 Amazon 数据保护政策为准；详见 **`references/api.md`**。\n\n---\n\n## Important Limitations\n\n- 权限：**Orders** 及相关角色；部分读取可能需 **Restricted Data Token**，不在本 skill 内实现。\n- **路径白名单**：若网关返回 **1005** 等拒绝转发，需后端放行 **`orders/v0/...`** 与 **`orders/2026-01-01/...`** 前缀。\n- 返回结构以 Amazon schema 为准；详见 **`references/api.md`**。\n\n**Feedback：** 见 `references/api.md`，`skillName`：`linkfox-amazon-store-orders`。\n\n---\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\n<!-- LF_LARGE_RESPONSE_BLOCK -->\n## Handling Large Responses\n\nTo avoid overflowing the agent context, persist the response to disk and extract only the fields you need:\n\n```\npython scripts/response_io.py run --script scripts/check_auth_dependency.py --out-dir <DIR> '<params>'\npython scripts/response_io.py read <file> --fields \"<paths>\"   # or --path \"<JMESPath>\"\n```\n\n> 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.\n\n> This skill exposes multiple entry scripts: `check_auth_dependency.py`, `confirm_shipment.py`, `get_order.py`, `get_order_address.py`, `get_order_buyer_info.py`, `get_order_items.py`, `get_order_items_buyer_info.py`, `get_order_regulated_info.py`, `search_orders.py`, `update_shipment_status.py`, `update_verification_status.py`. Pass `--script scripts/<name>.py` to choose the one you need.\n\n`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.\n\n**When to prefer this pattern** — apply your judgment based on the response characteristics, e.g.:\n- High field count per record, or fields you don't need\n- Batch/paginated results (multiple items per call)\n- Long-text fields (descriptions, reviews, HTML, time series)\n- Output reused across later steps rather than consumed immediately\n\nFor small, single-use responses, calling the main script directly is fine.\n\n⚠️ The preview is a truncated schema + sample, not the full data. Any field-level decision must read from the persisted file via `read`.\n<!-- /LF_LARGE_RESPONSE_BLOCK -->\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-orders\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1782729978217\n}\n\nFile v1.0.1:references/api.md\n\n# linkfox-amazon-store-orders — API 与网关调用说明\n\n## 1. 调用链\n\n1. **`POST {STORE_API_BASE_URL}/spApi/storeTokens`**  \n   Body: `{\"sellerId\":\"<卖家ID>\",\"region\":\"NA|EU|FE|...\"}`  \n   响应需含 **`accessToken`**。\n\n2. **`POST {STORE_API_BASE_URL}/spApi/developerProxy`**  \n   Body 字段（与 listings / pricing 系列一致）：\n   - **`region`**：与 storeTokens 相同。\n   - **`path`**：Amazon SP-API 相对 path，**无**前导 `/`。\n   - **`method`**：`GET` | `POST` | `PATCH`。\n   - **`amzAccessToken`**：上一步的 access token。\n   - **`queryString`**（可选）：URL 查询串，不含 `?`。\n   - **`body`**（POST/PATCH）：JSON 字符串。\n   - **`contentType`**：如 `application/json`。\n\n环境变量：\n\n- **`LINKFOXAGENT_API_KEY`**（必填）：网关鉴权。\n- **`STORE_API_BASE_URL`** 或 **`SPAPI_BASE_URL`**（可选）：默认 `https://tool-gateway.linkfox.com`。\n\n---\n\n## 2. 脚本与 path / method 对照\n\n| 脚本 | method | path 模板 |\n|------|--------|-----------|\n| `search_orders.py` | GET | `orders/2026-01-01/orders` |\n| `get_order.py` | GET | `orders/2026-01-01/orders/{orderId}` |\n| `get_order_buyer_info.py` | GET | `orders/v0/orders/{orderId}/buyerInfo` |\n| `get_order_address.py` | GET | `orders/v0/orders/{orderId}/address` |\n| `get_order_items.py` | GET | `orders/v0/orders/{orderId}/orderItems` |\n| `get_order_items_buyer_info.py` | GET | `orders/v0/orders/{orderId}/orderItems/buyerInfo` |\n| `update_shipment_status.py` | POST | `orders/v0/orders/{orderId}/shipment` |\n| `get_order_regulated_info.py` | GET | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `update_verification_status.py` | PATCH | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `confirm_shipment.py` | POST | `orders/v0/orders/{orderId}/shipmentConfirmation` |\n\n`orderId` 在 path 中经 **percent-encoding**（与 listings SKU 处理一致）。\n\n---\n\n## 3. 各脚本 JSON 入参\n\n### 3.1 公共字段\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| sellerId | string | 是 | 卖家 ID |\n| region | string | 是 | NA / EU / FE 等与 auth 一致 |\n| skipDepCheck | boolean | 否 | 为 true 时跳过本地依赖探测 |\n\n### 3.2 `search_orders.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| marketplaceIds | string[] | 是 | 站点 ID 列表，长度 ≤ 50（以 Amazon 为准） |\n| createdAfter | string | 条件 | ISO 8601；与 `lastUpdatedAfter` **二选一** |\n| createdBefore | string | 否 | 与 `createdAfter` 同组使用 |\n| lastUpdatedAfter | string | 条件 | ISO 8601；与 `createdAfter` **二选一** |\n| lastUpdatedBefore | string | 否 | 与 `lastUpdatedAfter` 同组使用 |\n| fulfillmentStatuses | string[] | 否 | 如 PENDING、UNSHIPPED、SHIPPED、CANCELLED 等 |\n| fulfilledBy | string[] | 否 | MERCHANT、AMAZON |\n| maxResultsPerPage | number | 否 | 1～100，默认 100 |\n| paginationToken | string | 否 | 上一页响应 **`nextToken`** |\n| includedData | string[] | 否 | BUYER、RECIPIENT、PROCEEDS、FULFILLMENT、PACKAGES 等（见 [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders)） |\n\n脚本会在 stdout 的 JSON 中解析 **`searchOrders`**（当 `developerProxy.errcode==200` 且 `httpStatus==200` 时由 `body` JSON 解析）。\n\n### 3.3 `get_order.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | 亚马逊订单号 |\n| includedData | string[] | 否 | 同官方 `includedData` |\n\n解析字段：**`order`**。\n\n### 3.4 `get_order_buyer_info.py` / `get_order_address.py`\n\n| 字段 | 类型 | 必填 |\n|------|------|------|\n| orderId | string | 是 |\n\n解析字段：**`buyerInfo`** / **`shippingAddress`**（以实际 JSON 为准）。\n\n### 3.5 `get_order_items.py` / `get_order_items_buyer_info.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| nextToken | string | 否 | 映射为查询参数 **`NextToken`** |\n\n解析字段：**`orderItems`** / **`orderItemsBuyerInfo`**。\n\n### 3.6 `update_shipment_status.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| marketplaceId | string | 是 | |\n| shipmentStatus | string | 是 | ReadyForPickup、PickedUp、RefusedPickup |\n| orderItems | object[] | 否 | 部分更新时的行项目 |\n\n成功时 Amazon 常返回 **HTTP 204**，stdout 中 **`developerProxy`** 含状态即可，未必有 JSON body。\n\n### 3.7 `get_order_regulated_info.py`\n\n仅需 **`orderId`**。解析字段：**`regulatedOrder`**。\n\n### 3.8 `update_verification_status.py`\n\n| 方式 | 说明 |\n|------|------|\n| `regulatedOrderVerificationStatus` | 对象，脚本包装为 `{ \"regulatedOrderVerificationStatus\": ... }` |\n| `requestBody` | 整包 PATCH body 对象 |\n\n成功可能为 **204**。\n\n### 3.9 `confirm_shipment.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| requestBody | object | 是 | 与官方 **confirmShipment** schema 一致 |\n\n成功可能为 **204**。\n\n---\n\n## 4. 响应与错误\n\n- 脚本统一输出 JSON：`developerProxy` 为网关原样；部分脚本增加 **`resolvedPath`**、**`queryString`**、**`requestBody`**。\n- 优先阅读 **`developerProxy.errcode`**、**`developerProxy.httpStatus`**，再读 **`developerProxy.body`**（常为 Amazon 错误 JSON）。\n- **429**：需降频重试；searchOrders 默认速率较低。\n\n---\n\n## 5. 受限数据与 deprecated\n\n- **getOrderBuyerInfo / getOrderAddress / getOrderItems / getOrderItemsBuyerInfo** 在官方文档中标记为 **deprecated**；敏感数据需 **RDT** 与数据保护策略，见 [Tokens API](https://developer-docs.amazon.com/sp-api/reference/createrestricteddatatoken) 与 Orders 文档说明。\n- **getOrderRegulatedInfo** 的 `Accept` 等头若需特化，取决于网关是否支持透传；当前脚本未附加额外 Amazon 请求头。\n\n---\n\n## 6. Feedback\n\n若需反馈本 skill 问题，请在工单或内部渠道注明 **`skillName`: `linkfox-amazon-store-orders`**，并附上 `developerProxy` 完整 JSON（注意脱敏）。\n\nFile v1.0.1:skill-card.md\n\n## Description: <br>\nHelps agents operate Amazon seller order workflows by searching orders, retrieving order details and buyer, address, item, or regulated-order data, and preparing shipment or verification updates. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[linkfox-ai](https://clawhub.ai/user/linkfox-ai) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal developers and marketplace operations teams use this skill to manage Amazon seller order workflows, including order lookup, detail inspection, restricted-data retrieval, and shipment or verification updates. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Amazon tokens are sent through a third-party proxy service, and customer order data may appear in command output. <br>\nMitigation: Install only if you trust linkfox-ai and the proxy service, and verify proxy handling before using live seller credentials. <br>\nRisk: Buyer, address, regulated-order, and persisted response data can contain customer PII or other sensitive data. <br>\nMitigation: Prefer redacted output, ask before buyer or address retrieval, keep response files outside git working trees, and delete persisted files after use. <br>\nRisk: Shipment status, verification status, and shipment confirmation scripts can mutate order state. <br>\nMitigation: Review request bodies and Amazon status responses before running POST or PATCH scripts against production orders. <br>\n\n\n## Reference(s): <br>\n- [API and gateway usage notes](references/api.md) <br>\n- [Amazon SP-API searchOrders reference](https://developer-docs.amazon.com/sp-api/reference/searchorders) <br>\n- [Amazon SP-API getOrder reference](https://developer-docs.amazon.com/sp-api/reference/getorder-3) <br>\n- [Amazon SP-API getOrderBuyerInfo reference](https://developer-docs.amazon.com/sp-api/reference/getorderbuyerinfo) <br>\n- [Amazon SP-API getOrderAddress reference](https://developer-docs.amazon.com/sp-api/reference/getorderaddress) <br>\n- [Amazon SP-API getOrderItems reference](https://developer-docs.amazon.com/sp-api/reference/getorderitems) <br>\n- [Amazon SP-API getOrderItemsBuyerInfo reference](https://developer-docs.amazon.com/sp-api/reference/getorderitemsbuyerinfo) <br>\n- [Amazon SP-API updateShipmentStatus reference](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus) <br>\n- [Amazon SP-API getOrderRegulatedInfo reference](https://developer-docs.amazon.com/sp-api/reference/getorderregulatedinfo) <br>\n- [Amazon SP-API updateVerificationStatus reference](https://developer-docs.amazon.com/sp-api/reference/updateverificationstatus) <br>\n- [Amazon SP-API confirmShipment reference](https://developer-docs.amazon.com/sp-api/reference/confirmshipment) <br>\n- [Amazon SP-API createRestrictedDataToken reference](https://developer-docs.amazon.com/sp-api/reference/createrestricteddatatoken) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Guidance, Shell commands, JSON] <br>\n**Output Format:** [Markdown guidance with shell commands and JSON command output] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Command output may include Amazon order, buyer, address, regulated-order, and request-body JSON; large responses can be persisted to local files through response_io.py.] <br>\n\n## Skill Version(s): <br>\n1.0.1 (source: release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v0.0.1: 16 files, 23857 bytes\n\nFiles: references/api.md (6119b), scripts/_spapi_orders_common.py (4054b), scripts/check_auth_dependency.py (6077b), scripts/confirm_shipment.py (2330b), scripts/get_order_address.py (1906b), scripts/get_order_buyer_info.py (1928b), scripts/get_order_items_buyer_info.py (2122b), scripts/get_order_items.py (2052b), scripts/get_order_regulated_info.py (1892b), scripts/get_order.py (2671b), scripts/search_orders.py (4510b), scripts/update_shipment_status.py (3155b), scripts/update_verification_status.py (2708b), skill-card.md (3742b), SKILL.md (6251b), _meta.json (146b)\n\nFile v0.0.1:SKILL.md\n\n---\nname: linkfox-amazon-store-orders\nversion: 0.0.1\ncategory: product-sourcing\ndescription: 亚马逊店铺订单（与 linkfox-amazon-store-auth / report / listings / pricing 同系列），经 /spApi/developerProxy 调用 SP-API Orders：v2026-01-01 的 searchOrders、getOrder；v0 的 getOrderBuyerInfo、getOrderAddress、getOrderItems、getOrderItemsBuyerInfo、updateShipmentStatus、getOrderRegulatedInfo、updateVerificationStatus、confirmShipment。当用户提到亚马逊订单、searchOrders、getOrder、订单列表、订单详情、买家信息、收货地址、订单行、发货确认、管制订单、核验状态、Orders API、SP-API 订单 时触发。\n---\n\n# Amazon 店铺 Orders\n\n本 skill 与 **`linkfox-amazon-store-auth`**、**`linkfox-amazon-store-report`**、**`linkfox-amazon-store-listings`**、**`linkfox-amazon-store-pricing`** 同属 **Amazon Store** 系列：先 **`POST /spApi/storeTokens`** 取 **`accessToken`**，再 **`POST /spApi/developerProxy`** 转发上游 **`GET` / `POST` / `PATCH`**。\n\n## 官方参考索引\n\n| 能力 | 文档 |\n|------|------|\n| searchOrders | [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders) |\n| getOrder (v2026-01-01) | [getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3) |\n| getOrderBuyerInfo (deprecated) | [getOrderBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderbuyerinfo) |\n| getOrderAddress (deprecated) | [getOrderAddress](https://developer-docs.amazon.com/sp-api/reference/getorderaddress) |\n| getOrderItems (deprecated) | [getOrderItems](https://developer-docs.amazon.com/sp-api/reference/getorderitems) |\n| getOrderItemsBuyerInfo (deprecated) | [getOrderItemsBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderitemsbuyerinfo) |\n| updateShipmentStatus | [updateShipmentStatus](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus) |\n| getOrderRegulatedInfo | [getOrderRegulatedInfo](https://developer-docs.amazon.com/sp-api/reference/getorderregulatedinfo) |\n| updateVerificationStatus | [updateVerificationStatus](https://developer-docs.amazon.com/sp-api/reference/updateverificationstatus) |\n| confirmShipment | [confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment) |\n\n---\n\n## Prerequisites（必须先读）\n\n本 skill **依赖** **`linkfox-amazon-store-auth`**。\n\n1. 运行 `python scripts/check_auth_dependency.py`；若 exit code **42** 且 stderr 含 `DEPENDENCY_MISSING:`，请先安装 **`linkfox-amazon-store-auth`**。\n2. **不要**在本 skill 内绕过依赖实现授权或令牌逻辑。\n\n---\n\n## Current Capabilities（脚本一览）\n\n| 能力 | developerProxy `path`（要点） | 脚本 |\n|------|------------------------------|------|\n| searchOrders | `orders/2026-01-01/orders` + Query | `search_orders.py` |\n| getOrder | `orders/2026-01-01/orders/{orderId}` + Query | `get_order.py` |\n| getOrderBuyerInfo | `orders/v0/orders/{orderId}/buyerInfo` | `get_order_buyer_info.py` |\n| getOrderAddress | `orders/v0/orders/{orderId}/address` | `get_order_address.py` |\n| getOrderItems | `orders/v0/orders/{orderId}/orderItems` + NextToken | `get_order_items.py` |\n| getOrderItemsBuyerInfo | `orders/v0/orders/{orderId}/orderItems/buyerInfo` | `get_order_items_buyer_info.py` |\n| updateShipmentStatus | `orders/v0/orders/{orderId}/shipment`，POST JSON | `update_shipment_status.py` |\n| getOrderRegulatedInfo | `orders/v0/orders/{orderId}/regulatedInfo` | `get_order_regulated_info.py` |\n| updateVerificationStatus | `orders/v0/orders/{orderId}/regulatedInfo`，PATCH JSON | `update_verification_status.py` |\n| confirmShipment | `orders/v0/orders/{orderId}/shipmentConfirmation`，POST JSON | `confirm_shipment.py` |\n\n共享逻辑见 **`scripts/_spapi_orders_common.py`**（仅供同目录脚本 import，非独立 CLI）。\n\n---\n\n## Quick Parameters（摘要）\n\n- **searchOrders**：`createdAfter` **或** `lastUpdatedAfter`（二选一）；`marketplaceIds`；可选 `fulfillmentStatuses`、`fulfilledBy`、`maxResultsPerPage`、`paginationToken`（上一页 **`nextToken`**）、`includedData`。\n- **getOrder**：`orderId`；可选 **`includedData`**（如 BUYER、FULFILLMENT、PACKAGES）。\n- **getOrderItems / getOrderItemsBuyerInfo**：可选 **`nextToken`** → 查询参数 `NextToken`。\n- **updateShipmentStatus**：`marketplaceId`、`shipmentStatus`（ReadyForPickup / PickedUp / RefusedPickup）；可选 **`orderItems`**。\n- **updateVerificationStatus**：传 **`regulatedOrderVerificationStatus`** 对象，或整包 **`requestBody`**。\n- **confirmShipment**：**`requestBody`** 为官方要求的完整对象（通常含 **`packageDetail`** 等）。\n\n---\n\n## Scripts\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/search_orders.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"lastUpdatedAfter\":\"2026-05-01T00:00:00Z\"}'\n\npython scripts/get_order.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"orderId\":\"123-1234567-1234567\",\"includedData\":[\"FULFILLMENT\",\"PACKAGES\"]}'\n```\n\n---\n\n## Display Rules\n\n1. 先看网关 **`developerProxy.errcode` / `httpStatus`**，再解析各脚本附加字段（如 **`searchOrders`**、**`order`**）。\n2. **POST/PATCH** 脚本：`stdout` 中含 **`requestBody`**（组装后的 Amazon 请求体），便于排查。\n3. **v0 买家/地址/行项目** 接口在官方文档中为 **deprecated**；新集成优先用 **v2026-01-01** 的 **searchOrders / getOrder** 与 **`includedData`** 拉齐业务字段。\n4. **searchOrders** 默认速率较低（官方约 **0.0056 req/s**），注意 **429**。\n5. 受限 PII / RDT 以 Amazon 数据保护政策为准；详见 **`references/api.md`**。\n\n---\n\n## Important Limitations\n\n- 权限：**Orders** 及相关角色；部分读取可能需 **Restricted Data Token**，不在本 skill 内实现。\n- **路径白名单**：若网关返回 **1005** 等拒绝转发，需后端放行 **`orders/v0/...`** 与 **`orders/2026-01-01/...`** 前缀。\n- 返回结构以 Amazon schema 为准；详见 **`references/api.md`**。\n\n**Feedback：** 见 `references/api.md`，`skillName`：`linkfox-amazon-store-orders`。\n\n---\n*更多跨境 skill：[LinkFox Skills](https://skill.linkfox.com/)*\n\nFile v0.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-orders\",\n  \"version\": \"0.0.1\",\n  \"publishedAt\": 1779264288107\n}\n\nFile v0.0.1:references/api.md\n\n# linkfox-amazon-store-orders — API 与网关调用说明\n\n## 1. 调用链\n\n1. **`POST {STORE_API_BASE_URL}/spApi/storeTokens`**  \n   Body: `{\"sellerId\":\"<卖家ID>\",\"region\":\"NA|EU|FE|...\"}`  \n   响应需含 **`accessToken`**。\n\n2. **`POST {STORE_API_BASE_URL}/spApi/developerProxy`**  \n   Body 字段（与 listings / pricing 系列一致）：\n   - **`region`**：与 storeTokens 相同。\n   - **`path`**：Amazon SP-API 相对 path，**无**前导 `/`。\n   - **`method`**：`GET` | `POST` | `PATCH`。\n   - **`amzAccessToken`**：上一步的 access token。\n   - **`queryString`**（可选）：URL 查询串，不含 `?`。\n   - **`body`**（POST/PATCH）：JSON 字符串。\n   - **`contentType`**：如 `application/json`。\n\n环境变量：\n\n- **`LINKFOXAGENT_API_KEY`**（必填）：网关鉴权。\n- **`STORE_API_BASE_URL`** 或 **`SPAPI_BASE_URL`**（可选）：默认 `https://tool-gateway.linkfox.com`。\n\n---\n\n## 2. 脚本与 path / method 对照\n\n| 脚本 | method | path 模板 |\n|------|--------|-----------|\n| `search_orders.py` | GET | `orders/2026-01-01/orders` |\n| `get_order.py` | GET | `orders/2026-01-01/orders/{orderId}` |\n| `get_order_buyer_info.py` | GET | `orders/v0/orders/{orderId}/buyerInfo` |\n| `get_order_address.py` | GET | `orders/v0/orders/{orderId}/address` |\n| `get_order_items.py` | GET | `orders/v0/orders/{orderId}/orderItems` |\n| `get_order_items_buyer_info.py` | GET | `orders/v0/orders/{orderId}/orderItems/buyerInfo` |\n| `update_shipment_status.py` | POST | `orders/v0/orders/{orderId}/shipment` |\n| `get_order_regulated_info.py` | GET | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `update_verification_status.py` | PATCH | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `confirm_shipment.py` | POST | `orders/v0/orders/{orderId}/shipmentConfirmation` |\n\n`orderId` 在 path 中经 **percent-encoding**（与 listings SKU 处理一致）。\n\n---\n\n## 3. 各脚本 JSON 入参\n\n### 3.1 公共字段\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| sellerId | string | 是 | 卖家 ID |\n| region | string | 是 | NA / EU / FE 等与 auth 一致 |\n| skipDepCheck | boolean | 否 | 为 true 时跳过本地依赖探测 |\n\n### 3.2 `search_orders.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| marketplaceIds | string[] | 是 | 站点 ID 列表，长度 ≤ 50（以 Amazon 为准） |\n| createdAfter | string | 条件 | ISO 8601；与 `lastUpdatedAfter` **二选一** |\n| createdBefore | string | 否 | 与 `createdAfter` 同组使用 |\n| lastUpdatedAfter | string | 条件 | ISO 8601；与 `createdAfter` **二选一** |\n| lastUpdatedBefore | string | 否 | 与 `lastUpdatedAfter` 同组使用 |\n| fulfillmentStatuses | string[] | 否 | 如 PENDING、UNSHIPPED、SHIPPED、CANCELLED 等 |\n| fulfilledBy | string[] | 否 | MERCHANT、AMAZON |\n| maxResultsPerPage | number | 否 | 1～100，默认 100 |\n| paginationToken | string | 否 | 上一页响应 **`nextToken`** |\n| includedData | string[] | 否 | BUYER、RECIPIENT、PROCEEDS、FULFILLMENT、PACKAGES 等（见 [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders)） |\n\n脚本会在 stdout 的 JSON 中解析 **`searchOrders`**（当 `developerProxy.errcode==200` 且 `httpStatus==200` 时由 `body` JSON 解析）。\n\n### 3.3 `get_order.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | 亚马逊订单号 |\n| includedData | string[] | 否 | 同官方 `includedData` |\n\n解析字段：**`order`**。\n\n### 3.4 `get_order_buyer_info.py` / `get_order_address.py`\n\n| 字段 | 类型 | 必填 |\n|------|------|------|\n| orderId | string | 是 |\n\n解析字段：**`buyerInfo`** / **`shippingAddress`**（以实际 JSON 为准）。\n\n### 3.5 `get_order_items.py` / `get_order_items_buyer_info.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| nextToken | string | 否 | 映射为查询参数 **`NextToken`** |\n\n解析字段：**`orderItems`** / **`orderItemsBuyerInfo`**。\n\n### 3.6 `update_shipment_status.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId | string | 是 | |\n| marketplaceId | string | 是 | |\n| shipmentStatus | string | 是 | ReadyForPickup、PickedUp、RefusedPickup |\n| orderItems | object[] | 否 | 部分更新时的行项目 |\n\n成功时 Amazon 常返回 **HTTP 204**，stdout 中 **`developerProxy`** 含状态即可，未必有 JSON body。\n\n### 3.7 `get_order_regulated_info.py`\n\n仅需 **`orderId`**。解析字段：**`regulatedOrder`**。\n\n### 3.8 `update_verification_status.py`\n\n| 方式 | 说明 |\n|------|------|\n| `regulatedOrderVerificationStatus` | 对象，脚本包装为 `{ \"regulatedOrderVerificationStatus\": ... }` |\n| `requestBody` | 整包 PATCH body 对象 |\n\n成功可能为 **204**。\n\n### 3.9 `confirm_shipment.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| requestBody | object | 是 | 与官方 **confirmShipment** schema 一致 |\n\n成功可能为 **204**。\n\n---\n\n## 4. 响应与错误\n\n- 脚本统一输出 JSON：`developerProxy` 为网关原样；部分脚本增加 **`resolvedPath`**、**`queryString`**、**`requestBody`**。\n- 优先阅读 **`developerProxy.errcode`**、**`developerProxy.httpStatus`**，再读 **`developerProxy.body`**（常为 Amazon 错误 JSON）。\n- **429**：需降频重试；searchOrders 默认速率较低。\n\n---\n\n## 5. 受限数据与 deprecated\n\n- **getOrderBuyerInfo / getOrderAddress / getOrderItems / getOrderItemsBuyerInfo** 在官方文档中标记为 **deprecated**；敏感数据需 **RDT** 与数据保护策略，见 [Tokens API](https://developer-docs.amazon.com/sp-api/reference/createrestricteddatatoken) 与 Orders 文档说明。\n- **getOrderRegulatedInfo** 的 `Accept` 等头若需特化，取决于网关是否支持透传；当前脚本未附加额外 Amazon 请求头。\n\n---\n\n## 6. Feedback\n\n若需反馈本 skill 问题，请在工单或内部渠道注明 **`skillName`: `linkfox-amazon-store-orders`**，并附上 `developerProxy` 完整 JSON（注意脱敏）。\n\nFile v0.0.1:skill-card.md\n\n## Description: <br>\nHelps agents retrieve Amazon seller orders and order details, inspect buyer, address, item, and regulated-order information, and submit shipment or verification updates through Amazon SP-API Orders workflows. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[linkfox-ai](https://clawhub.ai/user/linkfox-ai) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and ecommerce operators use this skill to let an agent search Amazon orders, retrieve order-level data, inspect order items and restricted order details, and prepare operational updates such as shipment confirmation or regulated-order verification. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can expose Amazon customer order data, including buyer, address, item, and regulated-order details. <br>\nMitigation: Install only for users authorized to access the relevant seller account, use least-privilege Amazon roles and RDT controls, and redact stdout, logs, and support tickets. <br>\nRisk: The skill can change live shipment status, submit shipment confirmations, or update regulated-order verification status. <br>\nMitigation: Require deliberate human confirmation before running write operations and review the generated request body before submission. <br>\nRisk: The skill depends on sensitive gateway credentials and a configurable gateway endpoint. <br>\nMitigation: Protect LINKFOXAGENT_API_KEY, keep the gateway URL on a trusted endpoint, and avoid sharing command output that contains account or order data. <br>\n\n\n## Reference(s): <br>\n- [API and gateway calling guide](references/api.md) <br>\n- [Amazon SP-API searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders) <br>\n- [Amazon SP-API getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3) <br>\n- [Amazon SP-API getOrderBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderbuyerinfo) <br>\n- [Amazon SP-API getOrderAddress](https://developer-docs.amazon.com/sp-api/reference/getorderaddress) <br>\n- [Amazon SP-API getOrderItems](https://developer-docs.amazon.com/sp-api/reference/getorderitems) <br>\n- [Amazon SP-API getOrderItemsBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderitemsbuyerinfo) <br>\n- [Amazon SP-API updateShipmentStatus](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus) <br>\n- [Amazon SP-API getOrderRegulatedInfo](https://developer-docs.amazon.com/sp-api/reference/getorderregulatedinfo) <br>\n- [Amazon SP-API updateVerificationStatus](https://developer-docs.amazon.com/sp-api/reference/updateverificationstatus) <br>\n- [Amazon SP-API confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment) <br>\n- [Amazon SP-API createRestrictedDataToken](https://developer-docs.amazon.com/sp-api/reference/createrestricteddatatoken) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, Shell commands, Configuration, JSON, Guidance] <br>\n**Output Format:** [Markdown guidance with shell commands and JSON API responses] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Some scripts include resolved request paths, query strings, assembled request bodies, and developerProxy status details in stdout for troubleshooting.] <br>\n\n## Skill Version(s): <br>\n0.0.1 (source: frontmatter and server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>","readmeExcerpt":"Skill: 亚马逊-店铺订单 Owner: linkfox-ai Summary: 亚马逊卖家订单查询与履约状态管理。用于搜索订单、获取订单详情、订单商品、买家信息和收货地址，处理发货确认、配送状态、管制商品订单及买家核验状态。用户提到亚马逊订单、卖家订单列表、订单详情、Amazon order ID、买家信息、收货地址、订单行、确认发货、更新 shipment 状态、管制订单、核验状态、searchOrders、getOrder、Orders API 时触发。即使未明确说“Orders API”，只要希望查询或处理亚马逊商城中产生的卖家订单，也应触发此技能；MCF、FBA 入仓和 External Fulfillment 货件使用对应履约技能。 Tags: latest:1.0.8 Version history: v1.0.8 | 2026-09-14T04:58:06.568Z | user Update from 1.","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"export LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/search_orders.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"lastUpdatedAfter\":\"2026-05-01T00:00:00Z\"}'\n\npython scripts/get_order.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"orderId\":\"123-1234567-1234567\",\"includedData\":[\"FULFILLMENT\",\"PACKAGES\"]}'"},{"language":"bash","snippet":"export LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/search_orders.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"lastUpdatedAfter\":\"2026-05-01T00:00:00Z\"}'\n\npython scripts/get_order.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"orderId\":\"123-1234567-1234567\",\"includedData\":[\"FULFILLMENT\",\"PACKAGES\"]}'"},{"language":"bash","snippet":"export LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/search_orders.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"lastUpdatedAfter\":\"2026-05-01T00:00:00Z\"}'\n\npython scripts/get_order.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"orderId\":\"123-1234567-1234567\",\"includedData\":[\"FULFILLMENT\",\"PACKAGES\"]}'"},{"language":"bash","snippet":"export LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/search_orders.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"lastUpdatedAfter\":\"2026-05-01T00:00:00Z\"}'\n\npython scripts/get_order.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"orderId\":\"123-1234567-1234567\",\"includedData\":[\"FULFILLMENT\",\"PACKAGES\"]}'"},{"language":"bash","snippet":"export LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/search_orders.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"lastUpdatedAfter\":\"2026-05-01T00:00:00Z\"}'\n\npython scripts/get_order.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"orderId\":\"123-1234567-1234567\",\"includedData\":[\"FULFILLMENT\",\"PACKAGES\"]}'"},{"language":"bash","snippet":"export LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/search_orders.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"marketplaceIds\":[\"ATVPDKIKX0DER\"],\"lastUpdatedAfter\":\"2026-05-01T00:00:00Z\"}'\n\npython scripts/get_order.py '{\"sellerId\":\"A1...\",\"region\":\"NA\",\"orderId\":\"123-1234567-1234567\",\"includedData\":[\"FULFILLMENT\",\"PACKAGES\"]}'"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: linkfox-amazon-store-orders\ndescription: 亚马逊卖家订单查询与履约状态管理。用于搜索订单、获取订单详情、订单商品、买家信息和收货地址，处理发货确认、配送状态、管制商品订单及买家核验状态。用户提到亚马逊订单、卖家订单列表、订单详情、Amazon order ID、买家信息、收货地址、订单行、确认发货、更新 shipment 状态、管制订单、核验状态、searchOrders、getOrder、Orders API 时触发。即使未明确说“Orders API”，只要希望查询或处理亚马逊商城中产生的卖家订单，也应触发此技能；MCF、FBA 入仓和 External Fulfillment 货件使用对应履约技能。\n---\n\n# Amazon 店铺 Orders\n\n本 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`**。\n\n## 调用方式\n\n- **API 端点**：`POST /spApi/developerProxy`（不同 SP-API 操作通过 path/method 区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗算力；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-orders-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和算力问题\n发生以下异常情况时，采用 references/onboarding.md 引导解决问题：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示算力或余额不足**：消息含\"算力余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n## 官方参考索引\n\n| 能力 | 文档 |\n|------|------|\n| searchOrders | [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders) |\n| getOrder (v2026-01-01) | [getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3) |\n| getOrderBuyerInfo (deprecated) | [getOrderBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderbuyerinfo) |\n| getOrderAddress (deprecated) | [getOrderAddress](https://developer-docs.amazon.com/sp-api/reference/getorderaddress) |\n| getOrderItems (deprecated) | [getOrderItems](https://developer-docs.amazon.com/sp-api/reference/getorderitems) |\n| getOrderItemsBuyerInfo (deprecated) | [getOrderItemsBuyerInfo](https://developer-docs.amazon.com/sp-api/reference/getorderitemsbuyerinfo) |\n| updateShipmentStatus | [updateShipmentStatus](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus) |\n| getOrderRegulatedInfo | [getOrderRegulatedInfo](https://developer-docs.amazon.com/sp-api/reference/getorderregulatedinfo) |\n| updateVerificationStatus | [updateVerificationStatus](https://developer-docs.amazon.com/sp-api/reference/updateverificationstatus) |\n| confirmShipment | [confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment) |\n\n---\n\n## Prerequisites（必须先读）\n"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-amazon-store-orders\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1789361886568\n}"},{"path":"references/api.md","content":"# linkfox-amazon-store-orders — API 与网关调用说明\n\n## 1. 调用链\n\n1. **`POST ${LINKFOX_TOOL_GATEWAY}/spApi/storeTokens`**  \n   Body: `{\"sellerId\":\"<卖家ID>\",\"region\":\"NA|EU|FE|...\"}`  \n   响应需含 **`accessToken`**。\n\n2. **`POST ${LINKFOX_TOOL_GATEWAY}/spApi/developerProxy`**  \n   Body 字段（与 listings / pricing 系列一致）：\n   - **`region`**：与 storeTokens 相同。\n   - **`path`**：Amazon SP-API 相对 path，**无**前导 `/`。\n   - **`method`**：`GET` | `POST` | `PATCH`。\n   - **`amzAccessToken`**：上一步的 access token。\n   - **`queryString`**（可选）：URL 查询串，不含 `?`。\n   - **`body`**（POST/PATCH）：JSON 字符串。\n   - **`contentType`**：如 `application/json`。\n\n环境变量：\n\n- **`LINKFOX_AGENT_API_KEY`**（或 **`LINKFOXAGENT_API_KEY`**，必填）：网关鉴权。（如未配置 按 SKILL.md 的 **## 解决认证和算力问题** 处理）\n- **`LINKFOX_TOOL_GATEWAY`**（或 `STORE_API_BASE_URL` / `SPAPI_BASE_URL`，可选）：默认 `https://tool-gateway.linkfox.com`。\n\n---\n\n## 2. 脚本与 path / method 对照\n\n| 脚本 | method | path 模板 |\n|------|--------|-----------|\n| `search_orders.py` | GET | `orders/2026-01-01/orders` |\n| `get_order.py` | GET | `orders/2026-01-01/orders/{orderId}` |\n| `get_order_buyer_info.py` | GET | `orders/v0/orders/{orderId}/buyerInfo` |\n| `get_order_address.py` | GET | `orders/v0/orders/{orderId}/address` |\n| `get_order_items.py` | GET | `orders/v0/orders/{orderId}/orderItems` |\n| `get_order_items_buyer_info.py` | GET | `orders/v0/orders/{orderId}/orderItems/buyerInfo` |\n| `update_shipment_status.py` | POST | `orders/v0/orders/{orderId}/shipment` |\n| `get_order_regulated_info.py` | GET | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `update_verification_status.py` | PATCH | `orders/v0/orders/{orderId}/regulatedInfo` |\n| `confirm_shipment.py` | POST | `orders/v0/orders/{orderId}/shipmentConfirmation` |\n\n`orderId` 在 path 中经 **percent-encoding**（与 listings SKU 处理一致）。\n\n---\n\n## 3. 各脚本 JSON 入参\n\n### 3.1 公共字段\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| sellerId | string | 是 | 卖家 ID |\n| region | string | 是 | NA / EU / FE 等与 auth 一致 |\n| skipDepCheck | boolean | 否 | 为 true 时跳过本地依赖探测 |\n\n### 3.2 `search_orders.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| marketplaceIds | string[] | 是 | 站点 ID 列表，长度 ≤ 50（以 Amazon 为准） |\n| createdAfter | string | 条件 | ISO 8601；与 `lastUpdatedAfter` **二选一** |\n| createdBefore | string | 否 | 与 `createdAfter` 同组使用 |\n| lastUpdatedAfter | string | 条件 | ISO 8601；与 `createdAfter` **二选一** |\n| lastUpdatedBefore | string | 否 | 与 `lastUpdatedAfter` 同组使用 |\n| fulfillmentStatuses | string[] | 否 | 如 PENDING、UNSHIPPED、SHIPPED、CANCELLED 等 |\n| fulfilledBy | string[] | 否 | MERCHANT、AMAZON |\n| maxResultsPerPage | number | 否 | 1～100，默认 100 |\n| paginationToken | string | 否 | 上一页响应 **`nextToken`** |\n| includedData | string[] | 否 | BUYER、RECIPIENT、PROCEEDS、FULFILLMENT、PACKAGES 等（见 [searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders)） |\n\n脚本会在 stdout 的 JSON 中解析 **`searchOrders`**（当 `developerProxy.errcode==200` 且 `httpStatus==200` 时由 `body` JSON 解析）。\n\n### 3.3 `get_order.py`\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| orderId |"},{"path":"references/onboarding.md","content":"# 解决认证和算力问题\n\n调用本 skill 时若网关返回 **auth** 或 **billing** 错误，走本 skill 自带的 `scripts/onboarding.py` 完成引导。\n\n**auth 场景**：`errcode=401` 或消息含 `authorized error`/`鉴权失败`/`未授权`/`unauthorized`；或 `LINKFOX_AGENT_API_KEY` 与 `LINKFOXAGENT_API_KEY` 均为空。\n1. 若已配置 key → 先让用户重启会话（最常见误判），仍失败让用户重新取 key 或换手机号重注册\n2. 未配置 → 询问：自助去 https://agent.linkfox.com/ 取 key，或提供手机号让脚本注册\n3. 手机号路径：\n   - `python scripts/onboarding.py send-code <phone>` → 展示 JSON 里的 phone/agreements\n   - 收到验证码后：`python scripts/onboarding.py login <phone> <code>`\n   - 拿到 `api_key` 后把下面三平台配置转发给用户，提示重启会话生效：\n     - Windows PowerShell（永久）：`setx LINKFOX_AGENT_API_KEY \"<key>\"`\n     - macOS zsh：`echo 'export LINKFOX_AGENT_API_KEY=\"<key>\"' >> ~/.zshrc && source ~/.zshrc`\n     - Linux bash：`echo 'export LINKFOX_AGENT_API_KEY=\"<key>\"' >> ~/.bashrc && source ~/.bashrc`\n     - 变量名 `LINKFOX_AGENT_API_KEY`（主推）或 `LINKFOXAGENT_API_KEY`（老规范）任一即可\n\n**billing 场景**：`errcode=402` 或消息含 `算力/余额/quota/insufficient/充值/套餐到期`。\n- `python scripts/onboarding.py list-plans` → 有 AskUserQuestion 就弹菜单，否则输出编号清单让用户选\n- 校验 `plan_id` ∈ 清单、支付方式 ∈ 该套餐 `available_methods`（通常 `wechat/alipay`）\n- `python scripts/onboarding.py order <plan_id> <method>` → 展示优先级 PNG > `pay_url` > `ascii_qr`（标注兜底）\n- 已付款可选调 `python scripts/onboarding.py query <order_id>`，不主动轮询\n\n排除 `errcode=403`（无权限，不归入这两类）。所有子命令输出 stdout JSON，`error` 字段已含阶段前缀，透传给用户即可。完整用法：`python scripts/onboarding.py --help`。"},{"path":"skill-card.md","content":"## Description:\n\nHelps agents search Amazon seller orders, retrieve order details, buyer and shipping information, order items, regulated-order information, and manage shipment or verification status through LinkFox-managed Amazon SP-API calls.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[linkfox-ai](https://clawhub.ai/user/linkfox-ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal Amazon sellers, operators, and support agents use this skill to query seller order data, inspect buyer or fulfillment details, and perform supported shipment, verification, or regulated-order workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill handles Amazon seller order data, buyer information, shipping addresses, and regulated-order information.\n\nMitigation: Install only when the LinkFox gateway is trusted, treat saved output files and logs as sensitive, and require explicit user confirmation before retrieving PII.\n\nRisk: The onboarding flow can handle API keys, phone login codes, payment QR data, and order or billing status.\n\nMitigation: Use secure secret storage for API keys, avoid persisting secrets in shared shell profiles, and require explicit confirmation before creating paid orders.\n\nRisk: Configurable gateway environment variables can direct credential-bearing requests to alternate endpoints.\n\nMitigation: Prefer the default LinkFox gateway and review any custom gateway environment variable before use.\n\nRisk: Repeated failed or high-frequency Amazon SP-API requests can trigger store-level protective cooldowns.\n\nMitigation: Stop automatic retries on repeated 400, 403, 404, or 429 responses, correct parameters or authorization first, and observe retryAfter or blockedUntil values.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/linkfox-ai/skills/linkfox-amazon-store-orders)\n- [API and gateway calling guide](references/api.md)\n- [Authentication and billing onboarding](references/onboarding.md)\n- [Amazon SP-API searchOrders](https://developer-docs.amazon.com/sp-api/reference/searchorders)\n- [Amazon SP-API getOrder](https://developer-docs.amazon.com/sp-api/reference/getorder-3)\n- [Amazon SP-API getOrderItems](https://developer-docs.amazon.com/sp-api/reference/getorderitems)\n- [Amazon SP-API updateShipmentStatus](https://developer-docs.amazon.com/sp-api/reference/updateshipmentstatus)\n- [Amazon SP-API getOrderRegulatedInfo](https://developer-docs.amazon.com/sp-api/reference/getorderregulatedinfo)\n- [Amazon SP-API updateVerificationStatus](https://developer-docs.amazon.com/sp-api/reference/updateverificationstatus)\n- [Amazon SP-API confirmShipment](https://developer-docs.amazon.com/sp-api/reference/confirmshipment)\n- [Amazon SP-API createRestrictedDataToken](https://developer-docs.amazon.com/sp-api/reference/createrestricteddatatoken)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, API Calls, Files, Configuration]\n\n**Output Format:** [Markdown guid"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"亚马逊卖家订单查询与履约状态管理。用于搜索订单、获取订单详情、订单商品、买家信息和收货地址，处理发货确认、配送状态、管制商品订单及买家核验状态。用户提到亚马逊订单、卖家订单列表、订单详情、Amazon order ID、买家信息、收货地址、订单行、确认发货、更新 shipment 状态、管制订单、核验状态、searchOrders、getOrder、Orders API 时触发。即使未明确说“Orders API”，只要希望查询或处理亚马逊商城中产生的卖家订单，也应触发此技能；MCF、FBA 入仓和 External Fulfillment 货件使用对应履约技能。 Skill: 亚马逊-店铺订单 Owner: linkfox-ai Summary: 亚马逊卖家订单查询与履约状态管理。用于搜索订单、获取订单详情、订单商品、买家信息和收货地址，处理发货确认、配送状态、管制商品订单及买家核验状态。用户提到亚马逊订单、卖家订单列表、订单详情、Amazon order ID、买家信息、收货地址、订单行、确认发货、更新 shipment 状态、管制订单、核验状态、searchOrders、getOrder、Orders API 时触发。即使未明确说“Orders API”，只要希望查询或处理亚马逊商城中产生的卖家订单，也应触发此技能；MCF、FBA 入仓和 External Fulfillment 货件使用对应履约技能。 Tags: latest:1.0.8 Version history: v1.0.8 | 2026-09-14T04:58:06.568Z | user Update from 1.","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1221,"uniquenessScore":47,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T08:50:04.550Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T08:50:04.550Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T10:43:29.668Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}