{"id":"c4085f7d-cdbb-42ff-a97a-685b10648cf0","entityType":"agent","slug":"clawhub-linkfox-ai-linkfox-shopee-store-orders","name":"Shopee-店铺订单","canonicalUrl":"https://www.xpersona.co/agent/clawhub-linkfox-ai-linkfox-shopee-store-orders","canonicalPath":"/agent/clawhub-linkfox-ai-linkfox-shopee-store-orders","generatedAt":"2026-10-12T01:02:57.151Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T20:42:26.890Z","emptyReason":null},"description":"Shopee（虾皮）店铺订单（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Order 模块全部 22 个接口：get_order_list、get_order_detail、get_shipment_list、search_package_list、cancel_order、ship 相关 booking/invoice/FBS 等。当用户提到 Shopee 订单、虾皮订单列表、订单详情、包裹、拆单、取消订单、买家取消、订单备注、booking、FBS 发票、order_sn、READY_TO_SHIP、Shopee order processing 时触发。即使未明确提及\"订单\"，只要涉及已授权 Shopee 店铺的订单查询或订单处理，也应触发。","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 995 downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-shopee-store-orders","sourceUrl":"https://clawhub.ai/linkfox-ai/linkfox-shopee-store-orders","homepage":"https://clawhub.ai/linkfox-ai/skills/linkfox-shopee-store-orders","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/linkfox-ai/linkfox-shopee-store-orders","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/linkfox-ai/skills/linkfox-shopee-store-orders","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Shopee-店铺订单 technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T20:42:26.890Z","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-11T20:42:26.890Z","emptyReason":null},"stars":null,"forks":null,"downloads":995,"likes":null,"task":null,"library":null,"packageName":null,"latestVersion":"1.0.6","tractionLabel":"995 downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T20:42:26.819Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T20:42:26.890Z","lastCrawledAt":"2026-10-11T20:42:26.819Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T20:42:26.819Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.6","createdAt":"2026-09-14T05:29:30.473Z","changelog":"Update from 1.0.5 to 1.0.6","fileCount":55,"zipByteSize":68837},{"version":"1.0.5","createdAt":"2026-08-14T15:06:12.968Z","changelog":"Update from 1.0.4 to 1.0.5","fileCount":55,"zipByteSize":68783},{"version":"1.0.4","createdAt":"2026-08-07T11:05:10.259Z","changelog":"Update from 1.0.3 to 1.0.4","fileCount":55,"zipByteSize":68679},{"version":"1.0.3","createdAt":"2026-07-13T12:23:30.287Z","changelog":"Update from 1.0.2 to 1.0.3","fileCount":31,"zipByteSize":33197},{"version":"1.0.2","createdAt":"2026-07-06T11:32:08.967Z","changelog":"Update from 1.0.1 to 1.0.2","fileCount":31,"zipByteSize":32457},{"version":"1.0.1","createdAt":"2026-07-03T08:31:23.608Z","changelog":"Update from 1.0.0 to 1.0.1","fileCount":30,"zipByteSize":31002},{"version":"1.0.0","createdAt":"2026-07-02T14:53:40.605Z","changelog":"Initial release","fileCount":30,"zipByteSize":30984}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-shopee-store-orders","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-shopee-store-orders` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/linkfox-ai/linkfox-shopee-store-orders before using production credentials."],"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-shopee-store-orders/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-orders/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-orders/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-orders/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-orders/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-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-12T01:02:57.145Z"}},"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-shopee-store-orders/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-orders/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-store-orders/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-shopee-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":"medium","updatedAt":"2026-10-11T20:42:26.890Z","emptyReason":null},"readme":"Skill: Shopee-店铺订单\n\nOwner: linkfox-ai\n\nSummary: Shopee（虾皮）店铺订单（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Order 模块全部 22 个接口：get_order_list、get_order_detail、get_shipment_list、search_package_list、cancel_order、ship 相关 booking/invoice/FBS 等。当用户提到 Shopee 订单、虾皮订单列表、订单详情、包裹、拆单、取消订单、买家取消、订单备注、booking、FBS 发票、order_sn、READY_TO_SHIP、Shopee order processing 时触发。即使未明确提及\"订单\"，只要涉及已授权 Shopee 店铺的订单查询或订单处理，也应触发。\n\nTags: latest:1.0.6\n\nVersion history:\n\nv1.0.6 | 2026-09-14T05:29:30.473Z | user\n\nUpdate from 1.0.5 to 1.0.6\n\nv1.0.5 | 2026-08-14T15:06:12.968Z | user\n\nUpdate from 1.0.4 to 1.0.5\n\nv1.0.4 | 2026-08-07T11:05:10.259Z | user\n\nUpdate from 1.0.3 to 1.0.4\n\nv1.0.3 | 2026-07-13T12:23:30.287Z | user\n\nUpdate from 1.0.2 to 1.0.3\n\nv1.0.2 | 2026-07-06T11:32:08.967Z | user\n\nUpdate from 1.0.1 to 1.0.2\n\nv1.0.1 | 2026-07-03T08:31:23.608Z | user\n\nUpdate from 1.0.0 to 1.0.1\n\nv1.0.0 | 2026-07-02T14:53:40.605Z | user\n\nInitial release\n\nArchive index:\n\nArchive v1.0.6: 55 files, 68837 bytes\n\nFiles: references/api.md (5718b), references/apis/cancel-order.md (2270b), references/apis/download-fbs-invoices.md (1949b), references/apis/download-invoice-doc.md (1707b), references/apis/generate-fbs-invoices.md (1929b), references/apis/get-booking-detail.md (1862b), references/apis/get-booking-list.md (2360b), references/apis/get-buyer-invoice-info.md (1763b), references/apis/get-estimiate-cancel-value.md (2534b), references/apis/get-fbs-invoices-result.md (1807b), references/apis/get-order-detail.md (2019b), references/apis/get-order-list.md (2605b), references/apis/get-package-detail.md (1842b), references/apis/get-pending-buyer-invoice-order-list.md (1920b), references/apis/get-shipment-list.md (1841b), references/apis/get-warehouse-filter-config.md (1707b), references/apis/handle-buyer-cancellation.md (1891b), references/apis/handle-prescription-check.md (2644b), references/apis/search-package-list.md (2504b), references/apis/set-note.md (1640b), references/apis/split-order.md (1835b), references/apis/unsplit-order.md (1651b), references/apis/upload-invoice-doc.md (1933b), references/onboarding.md (1999b), scripts/_order_api_runner.py (5553b), scripts/_order_endpoints.py (7445b), scripts/_shopee_orders_common.py (12251b), scripts/cancel_order.py (651b), scripts/check_auth_dependency.py (3979b), scripts/download_fbs_invoices.py (705b), scripts/download_invoice_doc.py (699b), scripts/generate_fbs_invoices.py (705b), scripts/get_booking_detail.py (687b), scripts/get_booking_list.py (675b), scripts/get_buyer_invoice_info.py (711b), scripts/get_estimiate_cancel_value.py (735b), scripts/get_fbs_invoices_result.py (717b), scripts/get_order_detail.py (675b), scripts/get_order_list.py (663b), scripts/get_package_detail.py (687b), scripts/get_pending_buyer_invoice_order_list.py (795b), scripts/get_shipment_list.py (681b), scripts/get_warehouse_filter_config.py (741b), scripts/handle_buyer_cancellation.py (729b), scripts/handle_prescription_check.py (729b), scripts/onboarding.py (24027b), scripts/order_api.py (1388b), scripts/search_package_list.py (693b), scripts/set_note.py (627b), scripts/split_order.py (645b), scripts/unsplit_order.py (657b), scripts/upload_invoice_doc.py (687b), skill-card.md (3333b), SKILL.md (10926b), _meta.json (146b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: linkfox-shopee-store-orders\ndescription: Shopee（虾皮）店铺订单（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Order 模块全部 22 个接口：get_order_list、get_order_detail、get_shipment_list、search_package_list、cancel_order、ship 相关 booking/invoice/FBS 等。当用户提到 Shopee 订单、虾皮订单列表、订单详情、包裹、拆单、取消订单、买家取消、订单备注、booking、FBS 发票、order_sn、READY_TO_SHIP、Shopee order processing 时触发。即使未明确提及\"订单\"，只要涉及已授权 Shopee 店铺的订单查询或订单处理，也应触发。\n---\n\n# Shopee 店铺 Orders\n\nShopee Open Platform **Order 模块**（22 个 API）。**依赖 `linkfox-shopee-store-auth`** 选店；经 **`POST /shopee/developerProxy`** 传入 `shopId`（或 `merchantId`），由服务端解析 token 转发（`path` 须 `api/v2/order/...`）。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗算力；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<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\nOrder 模块索引：[Shopee Open Platform — Order](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1)\n\n---\n\n## Prerequisites（必须先读）\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`** 并授权店铺。\n2. **不要**在本 skill 内实现授权/令牌逻辑。\n\n---\n\n## Core Concepts\n\n- **转发链路**：`developerProxy`（`shopId`/`merchantId` 选店，服务端注入 token）→ 紫鸟 `shopee-proxy` → Shopee API（`partner_id`/`sign` 由代理自动处理）\n- **列表 → 详情**：`get_order_list` 得 `order_sn` → `get_order_detail` 拉全量字段（≤50 个/次）\n- **包裹流**：`search_package_list` / `get_package_detail` / `get_shipment_list` 用于发货前包裹视图\n- **写操作**：`split_order`、`cancel_order`、`set_note` 等为 **POST JSON body**\n- **时间窗**：`get_order_list` / `get_booking_list` 的 `time_from`/`time_to` 最大 **15 天**\n\n## 可用脚本（Order 模块 22 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `get_order_list.py` | get_order_list | GET |\n| `get_order_detail.py` | get_order_detail | GET |\n| `get_shipment_list.py` | get_shipment_list | GET |\n| `search_package_list.py` | search_package_list | POST |\n| `get_package_detail.py` | get_package_detail | GET |\n| `split_order.py` | split_order | POST |\n| `unsplit_order.py` | unsplit_order | POST |\n| `cancel_order.py` | cancel_order | POST |\n| `handle_buyer_cancellation.py` | handle_buyer_cancellation | POST |\n| `set_note.py` | set_note | POST |\n| `get_pending_buyer_invoice_order_list.py` | get_pending_buyer_invoice_order_list | GET |\n| `get_buyer_invoice_info.py` | get_buyer_invoice_info | POST |\n| `upload_invoice_doc.py` | upload_invoice_doc | POST |\n| `download_invoice_doc.py` | download_invoice_doc | GET |\n| `handle_prescription_check.py` | handle_prescription_check | POST |\n| `get_warehouse_filter_config.py` | get_warehouse_filter_config | GET |\n| `get_booking_list.py` | get_booking_list | GET |\n| `get_booking_detail.py` | get_booking_detail | GET |\n| `generate_fbs_invoices.py` | generate_fbs_invoices | POST |\n| `get_fbs_invoices_result.py` | get_fbs_invoices_result | POST |\n| `download_fbs_invoices.py` | download_fbs_invoices | POST |\n| `get_estimiate_cancel_value.py` | get_estimiate_cancel_value | POST |\n| `order_api.py` | 通用入口（JSON 含 `api` 字段） | — |\n\n共享：`_shopee_orders_common.py`、`_order_endpoints.py`、`_order_api_runner.py`。入参见 `references/apis/`。\n\n## 接口说明（按 API）\n\n入参与响应细节放在 `references/apis/`，SKILL 只保留索引。\n\n| API | 说明文档 |\n|-----|----------|\n| `cancel_order` | [references/apis/cancel-order.md](./references/apis/cancel-order.md) |\n| `download_fbs_invoices` | [references/apis/download-fbs-invoices.md](./references/apis/download-fbs-invoices.md) |\n| `download_invoice_doc` | [references/apis/download-invoice-doc.md](./references/apis/download-invoice-doc.md) |\n| `generate_fbs_invoices` | [references/apis/generate-fbs-invoices.md](./references/apis/generate-fbs-invoices.md) |\n| `get_booking_detail` | [references/apis/get-booking-detail.md](./references/apis/get-booking-detail.md) |\n| `get_booking_list` | [references/apis/get-booking-list.md](./references/apis/get-booking-list.md) |\n| `get_buyer_invoice_info` | [references/apis/get-buyer-invoice-info.md](./references/apis/get-buyer-invoice-info.md) |\n| `get_estimiate_cancel_value` | [references/apis/get-estimiate-cancel-value.md](./references/apis/get-estimiate-cancel-value.md) |\n| `get_fbs_invoices_result` | [references/apis/get-fbs-invoices-result.md](./references/apis/get-fbs-invoices-result.md) |\n| `get_order_detail` | [references/apis/get-order-detail.md](./references/apis/get-order-detail.md) |\n| `get_order_list` | [references/apis/get-order-list.md](./references/apis/get-order-list.md) |\n| `get_package_detail` | [references/apis/get-package-detail.md](./references/apis/get-package-detail.md) |\n| `get_pending_buyer_invoice_order_list` | [references/apis/get-pending-buyer-invoice-order-list.md](./references/apis/get-pending-buyer-invoice-order-list.md) |\n| `get_shipment_list` | [references/apis/get-shipment-list.md](./references/apis/get-shipment-list.md) |\n| `get_warehouse_filter_config` | [references/apis/get-warehouse-filter-config.md](./references/apis/get-warehouse-filter-config.md) |\n| `handle_buyer_cancellation` | [references/apis/handle-buyer-cancellation.md](./references/apis/handle-buyer-cancellation.md) |\n| `handle_prescription_check` | [references/apis/handle-prescription-check.md](./references/apis/handle-prescription-check.md) |\n| `search_package_list` | [references/apis/search-package-list.md](./references/apis/search-package-list.md) |\n| `set_note` | [references/apis/set-note.md](./references/apis/set-note.md) |\n| `split_order` | [references/apis/split-order.md](./references/apis/split-order.md) |\n| `unsplit_order` | [references/apis/unsplit-order.md](./references/apis/unsplit-order.md) |\n| `upload_invoice_doc` | [references/apis/upload-invoice-doc.md](./references/apis/upload-invoice-doc.md) |\n\n模块总览 / Feedback 见 [references/api.md](./references/api.md)。\n\n## Usage Scenarios\n\n### 1. 查待发货订单\n1. auth skill 定位 `shopId`\n2. `get_order_list.py`：`order_status=READY_TO_SHIP`，`time_range_field=update_time`，15 天内时间戳\n3. `get_order_detail.py`：传入 `order_sn_list`\n\n### 2. 包裹维度处理\n1. `search_package_list.py`：传 `pagination.page_size` 及可选 `filter`/`sort`（或整体 `body`）\n2. `get_package_detail.py`：`package_number_list`\n3. 发货物流见 Logistics 模块（非本 skill）\n\n### 3. 取消 / 备注 / 拆单\n- 取消：`cancel_order.py`（`order_sn` + `cancel_reason`）\n- 买家取消申请：`handle_buyer_cancellation.py`（`ACCEPT`/`REJECT`）\n- 备注：`set_note.py`\n- 拆单/合单：`split_order.py` / `unsplit_order.py`\n\n### 4. 选店（高频）\n\n| 用户上下文 | Agent 动作 |\n|---|---|\n| 只授权 1 家 | 直接用 `shopId` |\n| 多家 + 店名 | auth skill `authorized_stores.py` 澄清 |\n| 已给 order_sn | 直接详情/写操作脚本 |\n\n## 调用原则\n\n- 先看 **`developerProxy.httpStatus`**，再读 `*Response` 解析字段\n- GET：业务参数作为脚本 JSON 顶层字段（runner 拼 `queryString`）\n- POST：传 `body` 对象，或按 api.md 传顶层 body 字段\n- `upload_invoice_doc` 官方为 **multipart**；若网关不支持，需在文档中说明限制\n- 分页：`get_order_list` 用 `cursor`/`next_cursor`；`search_package_list` 用 `pagination.cursor`\n\n## 常见问题\n\n### 1005 path 白名单\n\n确认 path 为 `api/v2/order/...`。\n\n### 区域限制\n\n发票类 API 限 PH/BR；`get_buyer_invoice_info` 限 VN/TH/PH；FBS 发票限 BR。见 `references/api.md`。\n\n### token 过期\n\n回到 **`linkfox-shopee-store-auth`** 重新授权。\n\n## Not Applicable\n\n- 店铺授权 → `linkfox-shopee-store-auth`\n- 商户信息 → `linkfox-shopee-store-merchant`\n- 店铺信息与设置 → `linkfox-shopee-store-shop`\n- 商品 listing → `linkfox-shopee-store-product`\n- 账户健康 Account Health → `linkfox-shopee-store-account-health`\n- 跨境全球商品 → `linkfox-shopee-store-global-product`\n- 物流发货 → `linkfox-shopee-store-logistics`\n- 头程 FirstMile → `linkfox-shopee-store-first-mile`\n- 退货退款 → `linkfox-shopee-store-returns`\n- 支付结算 → `linkfox-shopee-store-payment`\n- 选品 → `linkfox-youying-shopee-product-search`\n\n## 算力消耗规则\n\n不消耗算力。\n\n**Feedback:**\n\nAuto-detect and report feedback via the Feedback API when any of the following apply:\n1. The functionality or purpose described in this skill does not match actual behavior\n2. The skill's results do not match the user's intent\n3. The user expresses dissatisfaction or praise about this skill\n4. Anything you believe could be improved\n\nCall the feedback API as specified in `references/api.md`. Do not interrupt the user's flow.\n\n\n---\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-orders\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1789363770473\n}\n\nFile v1.0.6:references/api.md\n\n# linkfox-shopee-store-orders — 参数与字段参考\r\n\r\n> 单接口入参/响应说明已拆到 **`apis/`**（按 API 一份）；本文件保留模块总览与 Feedback。\r\nShopee **Order 模块**全部 22 个 API，经 **`POST /shopee/developerProxy`** 转发。\r\n\r\n授权见 **`linkfox-shopee-store-auth`**。官方文档：[Order module](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1)\r\n\r\n## 通用约定\r\n\r\n- **Base URL**：`https://tool-gateway.linkfox.com`\r\n- **Method**：POST（网关），上游 Method 见各接口\r\n- **Auth**：Header `Authorization: <api_key>`（`LINKFOXAGENT_API_KEY`）\r\n- **流程**：`POST /shopee/storeTokens` → `POST /shopee/developerProxy`\r\n- **path**：须 `api/v2/order/...`（不含域名）\r\n- **紫鸟代理**：自动追加 `partner_id`、`timestamp`、`sign`；`access_token`/`shop_id` 由 `developerProxy` 写入\r\n\r\n**developerProxy Request**：\r\n| 参数 | 必填 | 说明 |\r\n|------|------|------|\r\n| `path` | 是 | 如 `api/v2/order/get_order_list` |\r\n| `method` | 是 | `GET` / `POST` |\r\n| `accessToken` | 是 | 店铺 token |\r\n| `shopId` / `merchantId` | 二选一 | 转发为 `shop_id` / `merchant_id` |\r\n| `queryString` | GET 时 | 业务 query，不含 `?` |\r\n| `body` | POST 时 | JSON 字符串 |\r\n| `contentType` | 否 | 默认 `application/json` |\r\n\r\n**developerProxy Response**：\r\n```json\r\n{\"httpStatus\": 200, \"contentType\": \"application/json\", \"body\": \"{\\\"error\\\":\\\"\\\",\\\"response\\\":{...}}\"}\r\n```\r\n\r\n脚本在 `httpStatus==200` 时解析 `body` 为 `{responseKey}` / `{responseKey}Response`。\r\n\r\n---\r\n\r\n## Order 模块总览\r\n\r\n| # | API | Method | path | 脚本 | 官方文档 |\r\n|---|-----|--------|------|------|----------|\r\n| 1 | get_order_list | GET | `api/v2/order/get_order_list` | `get_order_list.py` | [apis/get-order-list.md](./apis/get-order-list.md) |\r\n| 2 | get_order_detail | GET | `api/v2/order/get_order_detail` | `get_order_detail.py` | [apis/get-order-detail.md](./apis/get-order-detail.md) |\r\n| 3 | get_shipment_list | GET | `api/v2/order/get_shipment_list` | `get_shipment_list.py` | [apis/get-shipment-list.md](./apis/get-shipment-list.md) |\r\n| 4 | search_package_list | POST | `api/v2/order/search_package_list` | `search_package_list.py` | [apis/search-package-list.md](./apis/search-package-list.md) |\r\n| 5 | get_package_detail | GET | `api/v2/order/get_package_detail` | `get_package_detail.py` | [apis/get-package-detail.md](./apis/get-package-detail.md) |\r\n| 6 | split_order | POST | `api/v2/order/split_order` | `split_order.py` | [apis/split-order.md](./apis/split-order.md) |\r\n| 7 | unsplit_order | POST | `api/v2/order/unsplit_order` | `unsplit_order.py` | [apis/unsplit-order.md](./apis/unsplit-order.md) |\r\n| 8 | cancel_order | POST | `api/v2/order/cancel_order` | `cancel_order.py` | [apis/cancel-order.md](./apis/cancel-order.md) |\r\n| 9 | handle_buyer_cancellation | POST | `api/v2/order/handle_buyer_cancellation` | `handle_buyer_cancellation.py` | [apis/handle-buyer-cancellation.md](./apis/handle-buyer-cancellation.md) |\r\n| 10 | set_note | POST | `api/v2/order/set_note` | `set_note.py` | [apis/set-note.md](./apis/set-note.md) |\r\n| 11 | get_pending_buyer_invoice_order_list | GET | `api/v2/order/get_pending_buyer_invoice_order_list` | `get_pending_buyer_invoice_order_list.py` | [apis/get-pending-buyer-invoice-order-list.md](./apis/get-pending-buyer-invoice-order-list.md) |\r\n| 12 | get_buyer_invoice_info | POST | `api/v2/order/get_buyer_invoice_info` | `get_buyer_invoice_info.py` | [apis/get-buyer-invoice-info.md](./apis/get-buyer-invoice-info.md) |\r\n| 13 | upload_invoice_doc | POST | `api/v2/order/upload_invoice_doc` | `upload_invoice_doc.py` | [apis/upload-invoice-doc.md](./apis/upload-invoice-doc.md) |\r\n| 14 | download_invoice_doc | GET | `api/v2/order/download_invoice_doc` | `download_invoice_doc.py` | [apis/download-invoice-doc.md](./apis/download-invoice-doc.md) |\r\n| 15 | handle_prescription_check | POST | `api/v2/order/handle_prescription_check` | `handle_prescription_check.py` | [apis/handle-prescription-check.md](./apis/handle-prescription-check.md) |\r\n| 16 | get_warehouse_filter_config | GET | `api/v2/order/get_warehouse_filter_config` | `get_warehouse_filter_config.py` | [apis/get-warehouse-filter-config.md](./apis/get-warehouse-filter-config.md) |\r\n| 17 | get_booking_list | GET | `api/v2/order/get_booking_list` | `get_booking_list.py` | [apis/get-booking-list.md](./apis/get-booking-list.md) |\r\n| 18 | get_booking_detail | GET | `api/v2/order/get_booking_detail` | `get_booking_detail.py` | [apis/get-booking-detail.md](./apis/get-booking-detail.md) |\r\n| 19 | generate_fbs_invoices | POST | `api/v2/order/generate_fbs_invoices` | `generate_fbs_invoices.py` | [apis/generate-fbs-invoices.md](./apis/generate-fbs-invoices.md) |\r\n| 20 | get_fbs_invoices_result | POST | `api/v2/order/get_fbs_invoices_result` | `get_fbs_invoices_result.py` | [apis/get-fbs-invoices-result.md](./apis/get-fbs-invoices-result.md) |\r\n| 21 | download_fbs_invoices | POST | `api/v2/order/download_fbs_invoices` | `download_fbs_invoices.py` | [apis/download-fbs-invoices.md](./apis/download-fbs-invoices.md) |\r\n| 22 | get_estimiate_cancel_value | POST | `api/v2/order/get_estimiate_cancel_value` | `get_estimiate_cancel_value.py` | [apis/get-estimiate-cancel-value.md](./apis/get-estimiate-cancel-value.md) |\r\n\r\n通用入口：`order_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\r\n\r\n---\r\n\r\n## Feedback API\r\n\r\n```bash\r\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\"skillName\":\"linkfox-shopee-store-orders\",\"sentiment\":\"POSITIVE\",\r\n       \"category\":\"OTHER\",\"content\":\"订单接口正常\"}'\r\n```\n\nFile v1.0.6:references/apis/cancel-order.md\n\n# cancel_order\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/cancel_order.py` |\n| Method / path | POST `api/v2/order/cancel_order` |\n| 官方文档 | [cancel_order](https://open.shopee.com/documents/v2/v2.order.cancel_order?module=94&type=1) |\n| 用途 | cancel_reason: OUT_OF_STOCK/CUSTOMER_REQUEST/UNDELIVERABLE_AREA/COD_NOT_SUPPORTED |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `order_sn` | — | 是 | 见 notes / 官方文档 |\n| `cancel_reason` | — | 是 | 见 notes / 官方文档 |\n| `item_list` | — | 否（POST body） | 见 notes / 官方文档 |\n| `partial_cancel_item_list` | — | 否（POST body） | 见 notes / 官方文档 |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：cancel_reason: OUT_OF_STOCK/CUSTOMER_REQUEST/UNDELIVERABLE_AREA/COD_NOT_SUPPORTED\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/cancel_order.py '{\"shopId\": \"67890\", \"order_sn\": \"<order_sn>\", \"cancel_reason\": \"<cancel_reason>\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"cancel_order\", \"shopId\": \"67890\", \"order_sn\": \"<order_sn>\", \"cancel_reason\": \"<cancel_reason>\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`cancelOrder`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.cancel_order?module=94&type=1)\n\n**Body（必填）**：`order_sn`、`cancel_reason`\n\n**Body（可选）**：`item_list`、`partial_cancel_item_list`（`item_id`、`model_id`、`model_quantity` 等）\n\n**cancel_reason**：`OUT_OF_STOCK`、`CUSTOMER_REQUEST`、`UNDELIVERABLE_AREA`（TW/MY）、`COD_NOT_SUPPORTED`\n\n---\n\nFile v1.0.6:references/apis/download-fbs-invoices.md\n\n# download_fbs_invoices\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/download_fbs_invoices.py` |\n| Method / path | POST `api/v2/order/download_fbs_invoices` |\n| 官方文档 | [download_fbs_invoices](https://open.shopee.com/documents/v2/v2.order.download_fbs_invoices?module=94&type=1) |\n| 用途 | Download link expires in 30 minutes |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `request_id_list` | — | 否（POST body） | 见 notes / 官方文档 |\n| `request_id_list` | object | 否（可嵌在 body） | 嵌套对象；或整体传 `body` / `requestBody` |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Download link expires in 30 minutes\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/download_fbs_invoices.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"download_fbs_invoices\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`downloadFbsInvoices`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.download_fbs_invoices?module=94&type=1)\n\n**Body（必填）**：`request_id_list.request_id`（int 数组）\n\n**说明**：需先 `generate_fbs_invoices` → 本接口轮询结果 → 下载；链接 30 分钟过期。\n\n---\n\nFile v1.0.6:references/apis/download-invoice-doc.md\n\n# download_invoice_doc\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/download_invoice_doc.py` |\n| Method / path | GET `api/v2/order/download_invoice_doc` |\n| 官方文档 | [download_invoice_doc](https://open.shopee.com/documents/v2/v2.order.download_invoice_doc?module=94&type=1) |\n| 用途 | PH/BR |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `order_sn` | — | **是** | Query 必填（见 notes / 官方文档） |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：PH/BR\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/download_invoice_doc.py '{\"shopId\": \"67890\", \"order_sn\": \"<order_sn>\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"download_invoice_doc\", \"shopId\": \"67890\", \"order_sn\": \"<order_sn>\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`downloadInvoiceDoc`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.download_invoice_doc?module=94&type=1)\n\n**Query（必填）**：`order_sn`\n\n**区域**：PH、BR\n\n---\n\nFile v1.0.6:references/apis/generate-fbs-invoices.md\n\n# generate_fbs_invoices\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/generate_fbs_invoices.py` |\n| Method / path | POST `api/v2/order/generate_fbs_invoices` |\n| 官方文档 | [generate_fbs_invoices](https://open.shopee.com/documents/v2/v2.order.generate_fbs_invoices?module=94&type=1) |\n| 用途 | BR FBS; batch_download.start/end YYYYMMDD |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `batch_download` | — | 否（POST body） | 见 notes / 官方文档 |\n| `batch_download` | object | 否（可嵌在 body） | 嵌套对象；或整体传 `body` / `requestBody` |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：BR FBS; batch_download.start/end YYYYMMDD\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/generate_fbs_invoices.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"generate_fbs_invoices\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`generateFbsInvoices`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.generate_fbs_invoices?module=94&type=1)\n\n**Body（必填）**：`batch_download`（`start`/`end` YYYYMMDD、`document_type`、`file_type`；可选 `document_status`）\n\n**区域**：BR FBS\n\n---\n\nFile v1.0.6:references/apis/get-booking-detail.md\n\n# get_booking_detail\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_booking_detail.py` |\n| Method / path | GET `api/v2/order/get_booking_detail` |\n| 官方文档 | [get_booking_detail](https://open.shopee.com/documents/v2/v2.order.get_booking_detail?module=94&type=1) |\n| 用途 | booking_sn_list: comma-separated, max 50 |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `booking_sn_list` | — | **是** | Query 必填（见 notes / 官方文档） |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：booking_sn_list: comma-separated, max 50\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_booking_detail.py '{\"shopId\": \"67890\", \"booking_sn_list\": \"<booking_sn_list>\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"get_booking_detail\", \"shopId\": \"67890\", \"booking_sn_list\": \"<booking_sn_list>\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getBookingDetail`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_booking_detail?module=94&type=1)\n\n**Query（必填）**：`booking_sn_list`（逗号分隔，1–50 个）\n\n**Query（可选）**：`response_optional_fields`\n\n---\n\nFile v1.0.6:references/apis/get-booking-list.md\n\n# get_booking_list\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_booking_list.py` |\n| Method / path | GET `api/v2/order/get_booking_list` |\n| 官方文档 | [get_booking_list](https://open.shopee.com/documents/v2/v2.order.get_booking_list?module=94&type=1) |\n| 用途 | booking_status optional: READY_TO_SHIP/PROCESSED/SHIPPED/CANCELLED/MATCHED |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `time_range_field` | — | **是** | Query 必填（见 notes / 官方文档） |\n| `page_size` | — | **是** | Query 必填（见 notes / 官方文档） |\n| `time_to` | — | **是** | Query 必填（见 notes / 官方文档） |\n| `time_from` | — | **是** | Query 必填（见 notes / 官方文档） |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：booking_status optional: READY_TO_SHIP/PROCESSED/SHIPPED/CANCELLED/MATCHED\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_booking_list.py '{\"shopId\": \"67890\", \"time_range_field\": \"<time_range_field>\", \"time_from\": \"<time_from>\", \"time_to\": \"<time_to>\", \"page_size\": 20}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"get_booking_list\", \"shopId\": \"67890\", \"time_range_field\": \"<time_range_field>\", \"time_from\": \"<time_from>\", \"time_to\": \"<time_to>\", \"page_size\": 20}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getBookingList`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_booking_list?module=94&type=1)\n\n**Query（必填）**：`time_range_field`、`time_from`、`time_to`、`page_size`\n\n**Query（可选）**：`cursor`、`booking_status`（`READY_TO_SHIP`/`PROCESSED`/`SHIPPED`/`CANCELLED`/`MATCHED`）\n\n---\n\nFile v1.0.6:references/apis/get-buyer-invoice-info.md\n\n# get_buyer_invoice_info\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_buyer_invoice_info.py` |\n| Method / path | POST `api/v2/order/get_buyer_invoice_info` |\n| 官方文档 | [get_buyer_invoice_info](https://open.shopee.com/documents/v2/v2.order.get_buyer_invoice_info?module=94&type=1) |\n| 用途 | VN/TH/PH local sellers |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `queries` | — | 是 | 见 notes / 官方文档 |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：VN/TH/PH local sellers\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_buyer_invoice_info.py '{\"shopId\": \"67890\", \"queries\": \"<queries>\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"get_buyer_invoice_info\", \"shopId\": \"67890\", \"queries\": \"<queries>\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getBuyerInvoiceInfo`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_buyer_invoice_info?module=94&type=1)\n\n**Body（必填）**：`queries[]`（含 `order_sn`）\n\n**区域**：VN、TH、PH 本地卖家\n\n---\n\nFile v1.0.6:references/apis/get-estimiate-cancel-value.md\n\n# get_estimiate_cancel_value\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_estimiate_cancel_value.py` |\n| Method / path | POST `api/v2/order/get_estimiate_cancel_value` |\n| 官方文档 | [get_estimiate_cancel_value](https://open.shopee.com/documents/v2/v2.order.get_estimiate_cancel_value?module=94&type=1) |\n| 用途 | Official spelling: estimiate (not estimate) |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `order_sn` | — | 是 | 见 notes / 官方文档 |\n| `partial_cancel_item_list` | — | 是 | 见 notes / 官方文档 |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Official spelling: estimiate (not estimate)\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_estimiate_cancel_value.py '{\"shopId\": \"67890\", \"order_sn\": \"<order_sn>\", \"partial_cancel_item_list\": \"<partial_cancel_item_list>\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"get_estimiate_cancel_value\", \"shopId\": \"67890\", \"order_sn\": \"<order_sn>\", \"partial_cancel_item_list\": \"<partial_cancel_item_list>\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getEstimiateCancelValue`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_estimiate_cancel_value?module=94&type=1)\n\n> 官方 API 名拼写为 **estimiate**（非 estimate）。\n\n**Body（必填）**：`order_sn`、`partial_cancel_item_list[]`（`item_id`、`model_id`、`model_quantity`；可选 `order_item_id`、`promotion_group_id`）\n\n---\n\n## 网关错误码\n\n| errcode | 含义 | 建议 |\n|---------|------|------|\n| 1002 | 参数/未登录 | 检查 shopId 与 API Key |\n| 1003 | 代理/网络异常 | 重试 |\n| 1004 | 无授权记录 | auth skill |\n| 1005 | path 未白名单 | 确认 `api/v2/order/...` |\n\n紫鸟代理 HTTP：`400` 路径错误、`403` IP 白名单、`408` 超时、`5xx` 上游透传。\n\n---\n\nFile v1.0.6:references/apis/get-fbs-invoices-result.md\n\n# get_fbs_invoices_result\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_fbs_invoices_result.py` |\n| Method / path | POST `api/v2/order/get_fbs_invoices_result` |\n| 官方文档 | [get_fbs_invoices_result](https://open.shopee.com/documents/v2/v2.order.get_fbs_invoices_result?module=94&type=1) |\n| 用途 | Shopee Open API `get_fbs_invoices_result` |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `request_id_list` | — | 否（POST body） | 见 notes / 官方文档 |\n| `request_id_list` | object | 否（可嵌在 body） | 嵌套对象；或整体传 `body` / `requestBody` |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_fbs_invoices_result.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"get_fbs_invoices_result\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getFbsInvoicesResult`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_fbs_invoices_result?module=94&type=1)\n\n**Body（必填）**：`request_id_list.request_id`（int 数组）\n\n---\n\nArchive v1.0.5: 55 files, 68783 bytes\n\nFiles: references/api.md (5718b), references/apis/cancel-order.md (2270b), references/apis/download-fbs-invoices.md (1949b), references/apis/download-invoice-doc.md (1707b), references/apis/generate-fbs-invoices.md (1929b), references/apis/get-booking-detail.md (1862b), references/apis/get-booking-list.md (2360b), references/apis/get-buyer-invoice-info.md (1763b), references/apis/get-estimiate-cancel-value.md (2534b), references/apis/get-fbs-invoices-result.md (1807b), references/apis/get-order-detail.md (2019b), references/apis/get-order-list.md (2605b), references/apis/get-package-detail.md (1842b), references/apis/get-pending-buyer-invoice-order-list.md (1920b), references/apis/get-shipment-list.md (1841b), references/apis/get-warehouse-filter-config.md (1707b), references/apis/handle-buyer-cancellation.md (1891b), references/apis/handle-prescription-check.md (2644b), references/apis/search-package-list.md (2504b), references/apis/set-note.md (1640b), references/apis/split-order.md (1835b), references/apis/unsplit-order.md (1651b), references/apis/upload-invoice-doc.md (1933b), references/onboarding.md (2046b), scripts/_order_api_runner.py (5553b), scripts/_order_endpoints.py (7445b), scripts/_shopee_orders_common.py (12017b), scripts/cancel_order.py (651b), scripts/check_auth_dependency.py (3979b), scripts/download_fbs_invoices.py (705b), scripts/download_invoice_doc.py (699b), scripts/generate_fbs_invoices.py (705b), scripts/get_booking_detail.py (687b), scripts/get_booking_list.py (675b), scripts/get_buyer_invoice_info.py (711b), scripts/get_estimiate_cancel_value.py (735b), scripts/get_fbs_invoices_result.py (717b), scripts/get_order_detail.py (675b), scripts/get_order_list.py (663b), scripts/get_package_detail.py (687b), scripts/get_pending_buyer_invoice_order_list.py (795b), scripts/get_shipment_list.py (681b), scripts/get_warehouse_filter_config.py (741b), scripts/handle_buyer_cancellation.py (729b), scripts/handle_prescription_check.py (729b), scripts/onboarding.py (24089b), scripts/order_api.py (1388b), scripts/search_package_list.py (693b), scripts/set_note.py (627b), scripts/split_order.py (645b), scripts/unsplit_order.py (657b), scripts/upload_invoice_doc.py (687b), skill-card.md (3237b), SKILL.md (10926b), _meta.json (146b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: linkfox-shopee-store-orders\ndescription: Shopee（虾皮）店铺订单（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Order 模块全部 22 个接口：get_order_list、get_order_detail、get_shipment_list、search_package_list、cancel_order、ship 相关 booking/invoice/FBS 等。当用户提到 Shopee 订单、虾皮订单列表、订单详情、包裹、拆单、取消订单、买家取消、订单备注、booking、FBS 发票、order_sn、READY_TO_SHIP、Shopee order processing 时触发。即使未明确提及\"订单\"，只要涉及已授权 Shopee 店铺的订单查询或订单处理，也应触发。\n---\n\n# Shopee 店铺 Orders\n\nShopee Open Platform **Order 模块**（22 个 API）。**依赖 `linkfox-shopee-store-auth`** 选店；经 **`POST /shopee/developerProxy`** 传入 `shopId`（或 `merchantId`），由服务端解析 token 转发（`path` 须 `api/v2/order/...`）。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<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\nOrder 模块索引：[Shopee Open Platform — Order](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1)\n\n---\n\n## Prerequisites（必须先读）\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`** 并授权店铺。\n2. **不要**在本 skill 内实现授权/令牌逻辑。\n\n---\n\n## Core Concepts\n\n- **转发链路**：`developerProxy`（`shopId`/`merchantId` 选店，服务端注入 token）→ 紫鸟 `shopee-proxy` → Shopee API（`partner_id`/`sign` 由代理自动处理）\n- **列表 → 详情**：`get_order_list` 得 `order_sn` → `get_order_detail` 拉全量字段（≤50 个/次）\n- **包裹流**：`search_package_list` / `get_package_detail` / `get_shipment_list` 用于发货前包裹视图\n- **写操作**：`split_order`、`cancel_order`、`set_note` 等为 **POST JSON body**\n- **时间窗**：`get_order_list` / `get_booking_list` 的 `time_from`/`time_to` 最大 **15 天**\n\n## 可用脚本（Order 模块 22 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `get_order_list.py` | get_order_list | GET |\n| `get_order_detail.py` | get_order_detail | GET |\n| `get_shipment_list.py` | get_shipment_list | GET |\n| `search_package_list.py` | search_package_list | POST |\n| `get_package_detail.py` | get_package_detail | GET |\n| `split_order.py` | split_order | POST |\n| `unsplit_order.py` | unsplit_order | POST |\n| `cancel_order.py` | cancel_order | POST |\n| `handle_buyer_cancellation.py` | handle_buyer_cancellation | POST |\n| `set_note.py` | set_note | POST |\n| `get_pending_buyer_invoice_order_list.py` | get_pending_buyer_invoice_order_list | GET |\n| `get_buyer_invoice_info.py` | get_buyer_invoice_info | POST |\n| `upload_invoice_doc.py` | upload_invoice_doc | POST |\n| `download_invoice_doc.py` | download_invoice_doc | GET |\n| `handle_prescription_check.py` | handle_prescription_check | POST |\n| `get_warehouse_filter_config.py` | get_warehouse_filter_config | GET |\n| `get_booking_list.py` | get_booking_list | GET |\n| `get_booking_detail.py` | get_booking_detail | GET |\n| `generate_fbs_invoices.py` | generate_fbs_invoices | POST |\n| `get_fbs_invoices_result.py` | get_fbs_invoices_result | POST |\n| `download_fbs_invoices.py` | download_fbs_invoices | POST |\n| `get_estimiate_cancel_value.py` | get_estimiate_cancel_value | POST |\n| `order_api.py` | 通用入口（JSON 含 `api` 字段） | — |\n\n共享：`_shopee_orders_common.py`、`_order_endpoints.py`、`_order_api_runner.py`。入参见 `references/apis/`。\n\n## 接口说明（按 API）\n\n入参与响应细节放在 `references/apis/`，SKILL 只保留索引。\n\n| API | 说明文档 |\n|-----|----------|\n| `cancel_order` | [references/apis/cancel-order.md](./references/apis/cancel-order.md) |\n| `download_fbs_invoices` | [references/apis/download-fbs-invoices.md](./references/apis/download-fbs-invoices.md) |\n| `download_invoice_doc` | [references/apis/download-invoice-doc.md](./references/apis/download-invoice-doc.md) |\n| `generate_fbs_invoices` | [references/apis/generate-fbs-invoices.md](./references/apis/generate-fbs-invoices.md) |\n| `get_booking_detail` | [references/apis/get-booking-detail.md](./references/apis/get-booking-detail.md) |\n| `get_booking_list` | [references/apis/get-booking-list.md](./references/apis/get-booking-list.md) |\n| `get_buyer_invoice_info` | [references/apis/get-buyer-invoice-info.md](./references/apis/get-buyer-invoice-info.md) |\n| `get_estimiate_cancel_value` | [references/apis/get-estimiate-cancel-value.md](./references/apis/get-estimiate-cancel-value.md) |\n| `get_fbs_invoices_result` | [references/apis/get-fbs-invoices-result.md](./references/apis/get-fbs-invoices-result.md) |\n| `get_order_detail` | [references/apis/get-order-detail.md](./references/apis/get-order-detail.md) |\n| `get_order_list` | [references/apis/get-order-list.md](./references/apis/get-order-list.md) |\n| `get_package_detail` | [references/apis/get-package-detail.md](./references/apis/get-package-detail.md) |\n| `get_pending_buyer_invoice_order_list` | [references/apis/get-pending-buyer-invoice-order-list.md](./references/apis/get-pending-buyer-invoice-order-list.md) |\n| `get_shipment_list` | [references/apis/get-shipment-list.md](./references/apis/get-shipment-list.md) |\n| `get_warehouse_filter_config` | [references/apis/get-warehouse-filter-config.md](./references/apis/get-warehouse-filter-config.md) |\n| `handle_buyer_cancellation` | [references/apis/handle-buyer-cancellation.md](./references/apis/handle-buyer-cancellation.md) |\n| `handle_prescription_check` | [references/apis/handle-prescription-check.md](./references/apis/handle-prescription-check.md) |\n| `search_package_list` | [references/apis/search-package-list.md](./references/apis/search-package-list.md) |\n| `set_note` | [references/apis/set-note.md](./references/apis/set-note.md) |\n| `split_order` | [references/apis/split-order.md](./references/apis/split-order.md) |\n| `unsplit_order` | [references/apis/unsplit-order.md](./references/apis/unsplit-order.md) |\n| `upload_invoice_doc` | [references/apis/upload-invoice-doc.md](./references/apis/upload-invoice-doc.md) |\n\n模块总览 / Feedback 见 [references/api.md](./references/api.md)。\n\n## Usage Scenarios\n\n### 1. 查待发货订单\n1. auth skill 定位 `shopId`\n2. `get_order_list.py`：`order_status=READY_TO_SHIP`，`time_range_field=update_time`，15 天内时间戳\n3. `get_order_detail.py`：传入 `order_sn_list`\n\n### 2. 包裹维度处理\n1. `search_package_list.py`：传 `pagination.page_size` 及可选 `filter`/`sort`（或整体 `body`）\n2. `get_package_detail.py`：`package_number_list`\n3. 发货物流见 Logistics 模块（非本 skill）\n\n### 3. 取消 / 备注 / 拆单\n- 取消：`cancel_order.py`（`order_sn` + `cancel_reason`）\n- 买家取消申请：`handle_buyer_cancellation.py`（`ACCEPT`/`REJECT`）\n- 备注：`set_note.py`\n- 拆单/合单：`split_order.py` / `unsplit_order.py`\n\n### 4. 选店（高频）\n\n| 用户上下文 | Agent 动作 |\n|---|---|\n| 只授权 1 家 | 直接用 `shopId` |\n| 多家 + 店名 | auth skill `authorized_stores.py` 澄清 |\n| 已给 order_sn | 直接详情/写操作脚本 |\n\n## 调用原则\n\n- 先看 **`developerProxy.httpStatus`**，再读 `*Response` 解析字段\n- GET：业务参数作为脚本 JSON 顶层字段（runner 拼 `queryString`）\n- POST：传 `body` 对象，或按 api.md 传顶层 body 字段\n- `upload_invoice_doc` 官方为 **multipart**；若网关不支持，需在文档中说明限制\n- 分页：`get_order_list` 用 `cursor`/`next_cursor`；`search_package_list` 用 `pagination.cursor`\n\n## 常见问题\n\n### 1005 path 白名单\n\n确认 path 为 `api/v2/order/...`。\n\n### 区域限制\n\n发票类 API 限 PH/BR；`get_buyer_invoice_info` 限 VN/TH/PH；FBS 发票限 BR。见 `references/api.md`。\n\n### token 过期\n\n回到 **`linkfox-shopee-store-auth`** 重新授权。\n\n## Not Applicable\n\n- 店铺授权 → `linkfox-shopee-store-auth`\n- 商户信息 → `linkfox-shopee-store-merchant`\n- 店铺信息与设置 → `linkfox-shopee-store-shop`\n- 商品 listing → `linkfox-shopee-store-product`\n- 账户健康 Account Health → `linkfox-shopee-store-account-health`\n- 跨境全球商品 → `linkfox-shopee-store-global-product`\n- 物流发货 → `linkfox-shopee-store-logistics`\n- 头程 FirstMile → `linkfox-shopee-store-first-mile`\n- 退货退款 → `linkfox-shopee-store-returns`\n- 支付结算 → `linkfox-shopee-store-payment`\n- 选品 → `linkfox-youying-shopee-product-search`\n\n## 积分消耗规则\n\n不消耗积分。\n\n**Feedback:**\n\nAuto-detect and report feedback via the Feedback API when any of the following apply:\n1. The functionality or purpose described in this skill does not match actual behavior\n2. The skill's results do not match the user's intent\n3. The user expresses dissatisfaction or praise about this skill\n4. Anything you believe could be improved\n\nCall the feedback API as specified in `references/api.md`. Do not interrupt the user's flow.\n\n\n---\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-orders\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1786719972968\n}\n\nFile v1.0.5:references/api.md\n\n# linkfox-shopee-store-orders — 参数与字段参考\r\n\r\n> 单接口入参/响应说明已拆到 **`apis/`**（按 API 一份）；本文件保留模块总览与 Feedback。\r\nShopee **Order 模块**全部 22 个 API，经 **`POST /shopee/developerProxy`** 转发。\r\n\r\n授权见 **`linkfox-shopee-store-auth`**。官方文档：[Order module](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1)\r\n\r\n## 通用约定\r\n\r\n- **Base URL**：`https://tool-gateway.linkfox.com`\r\n- **Method**：POST（网关），上游 Method 见各接口\r\n- **Auth**：Header `Authorization: <api_key>`（`LINKFOXAGENT_API_KEY`）\r\n- **流程**：`POST /shopee/storeTokens` → `POST /shopee/developerProxy`\r\n- **path**：须 `api/v2/order/...`（不含域名）\r\n- **紫鸟代理**：自动追加 `partner_id`、`timestamp`、`sign`；`access_token`/`shop_id` 由 `developerProxy` 写入\r\n\r\n**developerProxy Request**：\r\n| 参数 | 必填 | 说明 |\r\n|------|------|------|\r\n| `path` | 是 | 如 `api/v2/order/get_order_list` |\r\n| `method` | 是 | `GET` / `POST` |\r\n| `accessToken` | 是 | 店铺 token |\r\n| `shopId` / `merchantId` | 二选一 | 转发为 `shop_id` / `merchant_id` |\r\n| `queryString` | GET 时 | 业务 query，不含 `?` |\r\n| `body` | POST 时 | JSON 字符串 |\r\n| `contentType` | 否 | 默认 `application/json` |\r\n\r\n**developerProxy Response**：\r\n```json\r\n{\"httpStatus\": 200, \"contentType\": \"application/json\", \"body\": \"{\\\"error\\\":\\\"\\\",\\\"response\\\":{...}}\"}\r\n```\r\n\r\n脚本在 `httpStatus==200` 时解析 `body` 为 `{responseKey}` / `{responseKey}Response`。\r\n\r\n---\r\n\r\n## Order 模块总览\r\n\r\n| # | API | Method | path | 脚本 | 官方文档 |\r\n|---|-----|--------|------|------|----------|\r\n| 1 | get_order_list | GET | `api/v2/order/get_order_list` | `get_order_list.py` | [apis/get-order-list.md](./apis/get-order-list.md) |\r\n| 2 | get_order_detail | GET | `api/v2/order/get_order_detail` | `get_order_detail.py` | [apis/get-order-detail.md](./apis/get-order-detail.md) |\r\n| 3 | get_shipment_list | GET | `api/v2/order/get_shipment_list` | `get_shipment_list.py` | [apis/get-shipment-list.md](./apis/get-shipment-list.md) |\r\n| 4 | search_package_list | POST | `api/v2/order/search_package_list` | `search_package_list.py` | [apis/search-package-list.md](./apis/search-package-list.md) |\r\n| 5 | get_package_detail | GET | `api/v2/order/get_package_detail` | `get_package_detail.py` | [apis/get-package-detail.md](./apis/get-package-detail.md) |\r\n| 6 | split_order | POST | `api/v2/order/split_order` | `split_order.py` | [apis/split-order.md](./apis/split-order.md) |\r\n| 7 | unsplit_order | POST | `api/v2/order/unsplit_order` | `unsplit_order.py` | [apis/unsplit-order.md](./apis/unsplit-order.md) |\r\n| 8 | cancel_order | POST | `api/v2/order/cancel_order` | `cancel_order.py` | [apis/cancel-order.md](./apis/cancel-order.md) |\r\n| 9 | handle_buyer_cancellation | POST | `api/v2/order/handle_buyer_cancellation` | `handle_buyer_cancellation.py` | [apis/handle-buyer-cancellation.md](./apis/handle-buyer-cancellation.md) |\r\n| 10 | set_note | POST | `api/v2/order/set_note` | `set_note.py` | [apis/set-note.md](./apis/set-note.md) |\r\n| 11 | get_pending_buyer_invoice_order_list | GET | `api/v2/order/get_pending_buyer_invoice_order_list` | `get_pending_buyer_invoice_order_list.py` | [apis/get-pending-buyer-invoice-order-list.md](./apis/get-pending-buyer-invoice-order-list.md) |\r\n| 12 | get_buyer_invoice_info | POST | `api/v2/order/get_buyer_invoice_info` | `get_buyer_invoice_info.py` | [apis/get-buyer-invoice-info.md](./apis/get-buyer-invoice-info.md) |\r\n| 13 | upload_invoice_doc | POST | `api/v2/order/upload_invoice_doc` | `upload_invoice_doc.py` | [apis/upload-invoice-doc.md](./apis/upload-invoice-doc.md) |\r\n| 14 | download_invoice_doc | GET | `api/v2/order/download_invoice_doc` | `download_invoice_doc.py` | [apis/download-invoice-doc.md](./apis/download-invoice-doc.md) |\r\n| 15 | handle_prescription_check | POST | `api/v2/order/handle_prescription_check` | `handle_prescription_check.py` | [apis/handle-prescription-check.md](./apis/handle-prescription-check.md) |\r\n| 16 | get_warehouse_filter_config | GET | `api/v2/order/get_warehouse_filter_config` | `get_warehouse_filter_config.py` | [apis/get-warehouse-filter-config.md](./apis/get-warehouse-filter-config.md) |\r\n| 17 | get_booking_list | GET | `api/v2/order/get_booking_list` | `get_booking_list.py` | [apis/get-booking-list.md](./apis/get-booking-list.md) |\r\n| 18 | get_booking_detail | GET | `api/v2/order/get_booking_detail` | `get_booking_detail.py` | [apis/get-booking-detail.md](./apis/get-booking-detail.md) |\r\n| 19 | generate_fbs_invoices | POST | `api/v2/order/generate_fbs_invoices` | `generate_fbs_invoices.py` | [apis/generate-fbs-invoices.md](./apis/generate-fbs-invoices.md) |\r\n| 20 | get_fbs_invoices_result | POST | `api/v2/order/get_fbs_invoices_result` | `get_fbs_invoices_result.py` | [apis/get-fbs-invoices-result.md](./apis/get-fbs-invoices-result.md) |\r\n| 21 | download_fbs_invoices | POST | `api/v2/order/download_fbs_invoices` | `download_fbs_invoices.py` | [apis/download-fbs-invoices.md](./apis/download-fbs-invoices.md) |\r\n| 22 | get_estimiate_cancel_value | POST | `api/v2/order/get_estimiate_cancel_value` | `get_estimiate_cancel_value.py` | [apis/get-estimiate-cancel-value.md](./apis/get-estimiate-cancel-value.md) |\r\n\r\n通用入口：`order_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\r\n\r\n---\r\n\r\n## Feedback API\r\n\r\n```bash\r\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\"skillName\":\"linkfox-shopee-store-orders\",\"sentiment\":\"POSITIVE\",\r\n       \"category\":\"OTHER\",\"content\":\"订单接口正常\"}'\r\n```\n\nFile v1.0.5:references/apis/cancel-order.md\n\n# cancel_order\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/cancel_order.py` |\n| Method / path | POST `api/v2/order/cancel_order` |\n| 官方文档 | [cancel_order](https://open.shopee.com/documents/v2/v2.order.cancel_order?module=94&type=1) |\n| 用途 | cancel_reason: OUT_OF_STOCK/CUSTOMER_REQUEST/UNDELIVERABLE_AREA/COD_NOT_SUPPORTED |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `order_sn` | — | 是 | 见 notes / 官方文档 |\n| `cancel_reason` | — | 是 | 见 notes / 官方文档 |\n| `item_list` | — | 否（POST body） | 见 notes / 官方文档 |\n| `partial_cancel_item_list` | — | 否（POST body） | 见 notes / 官方文档 |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：cancel_reason: OUT_OF_STOCK/CUSTOMER_REQUEST/UNDELIVERABLE_AREA/COD_NOT_SUPPORTED\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/cancel_order.py '{\"shopId\": \"67890\", \"order_sn\": \"<order_sn>\", \"cancel_reason\": \"<cancel_reason>\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"cancel_order\", \"shopId\": \"67890\", \"order_sn\": \"<order_sn>\", \"cancel_reason\": \"<cancel_reason>\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`cancelOrder`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.cancel_order?module=94&type=1)\n\n**Body（必填）**：`order_sn`、`cancel_reason`\n\n**Body（可选）**：`item_list`、`partial_cancel_item_list`（`item_id`、`model_id`、`model_quantity` 等）\n\n**cancel_reason**：`OUT_OF_STOCK`、`CUSTOMER_REQUEST`、`UNDELIVERABLE_AREA`（TW/MY）、`COD_NOT_SUPPORTED`\n\n---\n\nFile v1.0.5:references/apis/download-fbs-invoices.md\n\n# download_fbs_invoices\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/download_fbs_invoices.py` |\n| Method / path | POST `api/v2/order/download_fbs_invoices` |\n| 官方文档 | [download_fbs_invoices](https://open.shopee.com/documents/v2/v2.order.download_fbs_invoices?module=94&type=1) |\n| 用途 | Download link expires in 30 minutes |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `request_id_list` | — | 否（POST body） | 见 notes / 官方文档 |\n| `request_id_list` | object | 否（可嵌在 body） | 嵌套对象；或整体传 `body` / `requestBody` |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Download link expires in 30 minutes\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/download_fbs_invoices.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"download_fbs_invoices\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`downloadFbsInvoices`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.download_fbs_invoices?module=94&type=1)\n\n**Body（必填）**：`request_id_list.request_id`（int 数组）\n\n**说明**：需先 `generate_fbs_invoices` → 本接口轮询结果 → 下载；链接 30 分钟过期。\n\n---\n\nFile v1.0.5:references/apis/download-invoice-doc.md\n\n# download_invoice_doc\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/download_invoice_doc.py` |\n| Method / path | GET `api/v2/order/download_invoice_doc` |\n| 官方文档 | [download_invoice_doc](https://open.shopee.com/documents/v2/v2.order.download_invoice_doc?module=94&type=1) |\n| 用途 | PH/BR |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `order_sn` | — | **是** | Query 必填（见 notes / 官方文档） |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：PH/BR\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/download_invoice_doc.py '{\"shopId\": \"67890\", \"order_sn\": \"<order_sn>\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"download_invoice_doc\", \"shopId\": \"67890\", \"order_sn\": \"<order_sn>\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`downloadInvoiceDoc`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.download_invoice_doc?module=94&type=1)\n\n**Query（必填）**：`order_sn`\n\n**区域**：PH、BR\n\n---\n\nFile v1.0.5:references/apis/generate-fbs-invoices.md\n\n# generate_fbs_invoices\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/generate_fbs_invoices.py` |\n| Method / path | POST `api/v2/order/generate_fbs_invoices` |\n| 官方文档 | [generate_fbs_invoices](https://open.shopee.com/documents/v2/v2.order.generate_fbs_invoices?module=94&type=1) |\n| 用途 | BR FBS; batch_download.start/end YYYYMMDD |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `batch_download` | — | 否（POST body） | 见 notes / 官方文档 |\n| `batch_download` | object | 否（可嵌在 body） | 嵌套对象；或整体传 `body` / `requestBody` |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：BR FBS; batch_download.start/end YYYYMMDD\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/generate_fbs_invoices.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"generate_fbs_invoices\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`generateFbsInvoices`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.generate_fbs_invoices?module=94&type=1)\n\n**Body（必填）**：`batch_download`（`start`/`end` YYYYMMDD、`document_type`、`file_type`；可选 `document_status`）\n\n**区域**：BR FBS\n\n---\n\nFile v1.0.5:references/apis/get-booking-detail.md\n\n# get_booking_detail\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_booking_detail.py` |\n| Method / path | GET `api/v2/order/get_booking_detail` |\n| 官方文档 | [get_booking_detail](https://open.shopee.com/documents/v2/v2.order.get_booking_detail?module=94&type=1) |\n| 用途 | booking_sn_list: comma-separated, max 50 |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `booking_sn_list` | — | **是** | Query 必填（见 notes / 官方文档） |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：booking_sn_list: comma-separated, max 50\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_booking_detail.py '{\"shopId\": \"67890\", \"booking_sn_list\": \"<booking_sn_list>\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"get_booking_detail\", \"shopId\": \"67890\", \"booking_sn_list\": \"<booking_sn_list>\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getBookingDetail`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_booking_detail?module=94&type=1)\n\n**Query（必填）**：`booking_sn_list`（逗号分隔，1–50 个）\n\n**Query（可选）**：`response_optional_fields`\n\n---\n\nFile v1.0.5:references/apis/get-booking-list.md\n\n# get_booking_list\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_booking_list.py` |\n| Method / path | GET `api/v2/order/get_booking_list` |\n| 官方文档 | [get_booking_list](https://open.shopee.com/documents/v2/v2.order.get_booking_list?module=94&type=1) |\n| 用途 | booking_status optional: READY_TO_SHIP/PROCESSED/SHIPPED/CANCELLED/MATCHED |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `time_range_field` | — | **是** | Query 必填（见 notes / 官方文档） |\n| `page_size` | — | **是** | Query 必填（见 notes / 官方文档） |\n| `time_to` | — | **是** | Query 必填（见 notes / 官方文档） |\n| `time_from` | — | **是** | Query 必填（见 notes / 官方文档） |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：booking_status optional: READY_TO_SHIP/PROCESSED/SHIPPED/CANCELLED/MATCHED\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_booking_list.py '{\"shopId\": \"67890\", \"time_range_field\": \"<time_range_field>\", \"time_from\": \"<time_from>\", \"time_to\": \"<time_to>\", \"page_size\": 20}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"get_booking_list\", \"shopId\": \"67890\", \"time_range_field\": \"<time_range_field>\", \"time_from\": \"<time_from>\", \"time_to\": \"<time_to>\", \"page_size\": 20}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getBookingList`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_booking_list?module=94&type=1)\n\n**Query（必填）**：`time_range_field`、`time_from`、`time_to`、`page_size`\n\n**Query（可选）**：`cursor`、`booking_status`（`READY_TO_SHIP`/`PROCESSED`/`SHIPPED`/`CANCELLED`/`MATCHED`）\n\n---\n\nFile v1.0.5:references/apis/get-buyer-invoice-info.md\n\n# get_buyer_invoice_info\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_buyer_invoice_info.py` |\n| Method / path | POST `api/v2/order/get_buyer_invoice_info` |\n| 官方文档 | [get_buyer_invoice_info](https://open.shopee.com/documents/v2/v2.order.get_buyer_invoice_info?module=94&type=1) |\n| 用途 | VN/TH/PH local sellers |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `queries` | — | 是 | 见 notes / 官方文档 |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：VN/TH/PH local sellers\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_buyer_invoice_info.py '{\"shopId\": \"67890\", \"queries\": \"<queries>\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"get_buyer_invoice_info\", \"shopId\": \"67890\", \"queries\": \"<queries>\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getBuyerInvoiceInfo`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_buyer_invoice_info?module=94&type=1)\n\n**Body（必填）**：`queries[]`（含 `order_sn`）\n\n**区域**：VN、TH、PH 本地卖家\n\n---\n\nFile v1.0.5:references/apis/get-estimiate-cancel-value.md\n\n# get_estimiate_cancel_value\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_estimiate_cancel_value.py` |\n| Method / path | POST `api/v2/order/get_estimiate_cancel_value` |\n| 官方文档 | [get_estimiate_cancel_value](https://open.shopee.com/documents/v2/v2.order.get_estimiate_cancel_value?module=94&type=1) |\n| 用途 | Official spelling: estimiate (not estimate) |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `order_sn` | — | 是 | 见 notes / 官方文档 |\n| `partial_cancel_item_list` | — | 是 | 见 notes / 官方文档 |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Official spelling: estimiate (not estimate)\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_estimiate_cancel_value.py '{\"shopId\": \"67890\", \"order_sn\": \"<order_sn>\", \"partial_cancel_item_list\": \"<partial_cancel_item_list>\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"get_estimiate_cancel_value\", \"shopId\": \"67890\", \"order_sn\": \"<order_sn>\", \"partial_cancel_item_list\": \"<partial_cancel_item_list>\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getEstimiateCancelValue`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_estimiate_cancel_value?module=94&type=1)\n\n> 官方 API 名拼写为 **estimiate**（非 estimate）。\n\n**Body（必填）**：`order_sn`、`partial_cancel_item_list[]`（`item_id`、`model_id`、`model_quantity`；可选 `order_item_id`、`promotion_group_id`）\n\n---\n\n## 网关错误码\n\n| errcode | 含义 | 建议 |\n|---------|------|------|\n| 1002 | 参数/未登录 | 检查 shopId 与 API Key |\n| 1003 | 代理/网络异常 | 重试 |\n| 1004 | 无授权记录 | auth skill |\n| 1005 | path 未白名单 | 确认 `api/v2/order/...` |\n\n紫鸟代理 HTTP：`400` 路径错误、`403` IP 白名单、`408` 超时、`5xx` 上游透传。\n\n---\n\nFile v1.0.5:references/apis/get-fbs-invoices-result.md\n\n# get_fbs_invoices_result\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_fbs_invoices_result.py` |\n| Method / path | POST `api/v2/order/get_fbs_invoices_result` |\n| 官方文档 | [get_fbs_invoices_result](https://open.shopee.com/documents/v2/v2.order.get_fbs_invoices_result?module=94&type=1) |\n| 用途 | Shopee Open API `get_fbs_invoices_result` |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `request_id_list` | — | 否（POST body） | 见 notes / 官方文档 |\n| `request_id_list` | object | 否（可嵌在 body） | 嵌套对象；或整体传 `body` / `requestBody` |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_fbs_invoices_result.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"get_fbs_invoices_result\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getFbsInvoicesResult`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_fbs_invoices_result?module=94&type=1)\n\n**Body（必填）**：`request_id_list.request_id`（int 数组）\n\n---\n\nArchive v1.0.4: 55 files, 68679 bytes\n\nFiles: references/api.md (5718b), references/apis/cancel-order.md (2270b), references/apis/download-fbs-invoices.md (1949b), references/apis/download-invoice-doc.md (1707b), references/apis/generate-fbs-invoices.md (1929b), references/apis/get-booking-detail.md (1862b), references/apis/get-booking-list.md (2360b), references/apis/get-buyer-invoice-info.md (1763b), references/apis/get-estimiate-cancel-value.md (2534b), references/apis/get-fbs-invoices-result.md (1807b), references/apis/get-order-detail.md (2019b), references/apis/get-order-list.md (2605b), references/apis/get-package-detail.md (1842b), references/apis/get-pending-buyer-invoice-order-list.md (1920b), references/apis/get-shipment-list.md (1841b), references/apis/get-warehouse-filter-config.md (1707b), references/apis/handle-buyer-cancellation.md (1891b), references/apis/handle-prescription-check.md (2644b), references/apis/search-package-list.md (2504b), references/apis/set-note.md (1640b), references/apis/split-order.md (1835b), references/apis/unsplit-order.md (1651b), references/apis/upload-invoice-doc.md (1933b), references/onboarding.md (2046b), scripts/_order_api_runner.py (5553b), scripts/_order_endpoints.py (7445b), scripts/_shopee_orders_common.py (12017b), scripts/cancel_order.py (651b), scripts/check_auth_dependency.py (3979b), scripts/download_fbs_invoices.py (705b), scripts/download_invoice_doc.py (699b), scripts/generate_fbs_invoices.py (705b), scripts/get_booking_detail.py (687b), scripts/get_booking_list.py (675b), scripts/get_buyer_invoice_info.py (711b), scripts/get_estimiate_cancel_value.py (735b), scripts/get_fbs_invoices_result.py (717b), scripts/get_order_detail.py (675b), scripts/get_order_list.py (663b), scripts/get_package_detail.py (687b), scripts/get_pending_buyer_invoice_order_list.py (795b), scripts/get_shipment_list.py (681b), scripts/get_warehouse_filter_config.py (741b), scripts/handle_buyer_cancellation.py (729b), scripts/handle_prescription_check.py (729b), scripts/onboarding.py (24089b), scripts/order_api.py (1388b), scripts/search_package_list.py (693b), scripts/set_note.py (627b), scripts/split_order.py (645b), scripts/unsplit_order.py (657b), scripts/upload_invoice_doc.py (687b), skill-card.md (2801b), SKILL.md (10926b), _meta.json (146b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: linkfox-shopee-store-orders\ndescription: Shopee（虾皮）店铺订单（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Order 模块全部 22 个接口：get_order_list、get_order_detail、get_shipment_list、search_package_list、cancel_order、ship 相关 booking/invoice/FBS 等。当用户提到 Shopee 订单、虾皮订单列表、订单详情、包裹、拆单、取消订单、买家取消、订单备注、booking、FBS 发票、order_sn、READY_TO_SHIP、Shopee order processing 时触发。即使未明确提及\"订单\"，只要涉及已授权 Shopee 店铺的订单查询或订单处理，也应触发。\n---\n\n# Shopee 店铺 Orders\n\nShopee Open Platform **Order 模块**（22 个 API）。**依赖 `linkfox-shopee-store-auth`** 选店；经 **`POST /shopee/developerProxy`** 传入 `shopId`（或 `merchantId`），由服务端解析 token 转发（`path` 须 `api/v2/order/...`）。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<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\nOrder 模块索引：[Shopee Open Platform — Order](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1)\n\n---\n\n## Prerequisites（必须先读）\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`** 并授权店铺。\n2. **不要**在本 skill 内实现授权/令牌逻辑。\n\n---\n\n## Core Concepts\n\n- **转发链路**：`developerProxy`（`shopId`/`merchantId` 选店，服务端注入 token）→ 紫鸟 `shopee-proxy` → Shopee API（`partner_id`/`sign` 由代理自动处理）\n- **列表 → 详情**：`get_order_list` 得 `order_sn` → `get_order_detail` 拉全量字段（≤50 个/次）\n- **包裹流**：`search_package_list` / `get_package_detail` / `get_shipment_list` 用于发货前包裹视图\n- **写操作**：`split_order`、`cancel_order`、`set_note` 等为 **POST JSON body**\n- **时间窗**：`get_order_list` / `get_booking_list` 的 `time_from`/`time_to` 最大 **15 天**\n\n## 可用脚本（Order 模块 22 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `get_order_list.py` | get_order_list | GET |\n| `get_order_detail.py` | get_order_detail | GET |\n| `get_shipment_list.py` | get_shipment_list | GET |\n| `search_package_list.py` | search_package_list | POST |\n| `get_package_detail.py` | get_package_detail | GET |\n| `split_order.py` | split_order | POST |\n| `unsplit_order.py` | unsplit_order | POST |\n| `cancel_order.py` | cancel_order | POST |\n| `handle_buyer_cancellation.py` | handle_buyer_cancellation | POST |\n| `set_note.py` | set_note | POST |\n| `get_pending_buyer_invoice_order_list.py` | get_pending_buyer_invoice_order_list | GET |\n| `get_buyer_invoice_info.py` | get_buyer_invoice_info | POST |\n| `upload_invoice_doc.py` | upload_invoice_doc | POST |\n| `download_invoice_doc.py` | download_invoice_doc | GET |\n| `handle_prescription_check.py` | handle_prescription_check | POST |\n| `get_warehouse_filter_config.py` | get_warehouse_filter_config | GET |\n| `get_booking_list.py` | get_booking_list | GET |\n| `get_booking_detail.py` | get_booking_detail | GET |\n| `generate_fbs_invoices.py` | generate_fbs_invoices | POST |\n| `get_fbs_invoices_result.py` | get_fbs_invoices_result | POST |\n| `download_fbs_invoices.py` | download_fbs_invoices | POST |\n| `get_estimiate_cancel_value.py` | get_estimiate_cancel_value | POST |\n| `order_api.py` | 通用入口（JSON 含 `api` 字段） | — |\n\n共享：`_shopee_orders_common.py`、`_order_endpoints.py`、`_order_api_runner.py`。入参见 `references/apis/`。\n\n## 接口说明（按 API）\n\n入参与响应细节放在 `references/apis/`，SKILL 只保留索引。\n\n| API | 说明文档 |\n|-----|----------|\n| `cancel_order` | [references/apis/cancel-order.md](./references/apis/cancel-order.md) |\n| `download_fbs_invoices` | [references/apis/download-fbs-invoices.md](./references/apis/download-fbs-invoices.md) |\n| `download_invoice_doc` | [references/apis/download-invoice-doc.md](./references/apis/download-invoice-doc.md) |\n| `generate_fbs_invoices` | [references/apis/generate-fbs-invoices.md](./references/apis/generate-fbs-invoices.md) |\n| `get_booking_detail` | [references/apis/get-booking-detail.md](./references/apis/get-booking-detail.md) |\n| `get_booking_list` | [references/apis/get-booking-list.md](./references/apis/get-booking-list.md) |\n| `get_buyer_invoice_info` | [references/apis/get-buyer-invoice-info.md](./references/apis/get-buyer-invoice-info.md) |\n| `get_estimiate_cancel_value` | [references/apis/get-estimiate-cancel-value.md](./references/apis/get-estimiate-cancel-value.md) |\n| `get_fbs_invoices_result` | [references/apis/get-fbs-invoices-result.md](./references/apis/get-fbs-invoices-result.md) |\n| `get_order_detail` | [references/apis/get-order-detail.md](./references/apis/get-order-detail.md) |\n| `get_order_list` | [references/apis/get-order-list.md](./references/apis/get-order-list.md) |\n| `get_package_detail` | [references/apis/get-package-detail.md](./references/apis/get-package-detail.md) |\n| `get_pending_buyer_invoice_order_list` | [references/apis/get-pending-buyer-invoice-order-list.md](./references/apis/get-pending-buyer-invoice-order-list.md) |\n| `get_shipment_list` | [references/apis/get-shipment-list.md](./references/apis/get-shipment-list.md) |\n| `get_warehouse_filter_config` | [references/apis/get-warehouse-filter-config.md](./references/apis/get-warehouse-filter-config.md) |\n| `handle_buyer_cancellation` | [references/apis/handle-buyer-cancellation.md](./references/apis/handle-buyer-cancellation.md) |\n| `handle_prescription_check` | [references/apis/handle-prescription-check.md](./references/apis/handle-prescription-check.md) |\n| `search_package_list` | [references/apis/search-package-list.md](./references/apis/search-package-list.md) |\n| `set_note` | [references/apis/set-note.md](./references/apis/set-note.md) |\n| `split_order` | [references/apis/split-order.md](./references/apis/split-order.md) |\n| `unsplit_order` | [references/apis/unsplit-order.md](./references/apis/unsplit-order.md) |\n| `upload_invoice_doc` | [references/apis/upload-invoice-doc.md](./references/apis/upload-invoice-doc.md) |\n\n模块总览 / Feedback 见 [references/api.md](./references/api.md)。\n\n## Usage Scenarios\n\n### 1. 查待发货订单\n1. auth skill 定位 `shopId`\n2. `get_order_list.py`：`order_status=READY_TO_SHIP`，`time_range_field=update_time`，15 天内时间戳\n3. `get_order_detail.py`：传入 `order_sn_list`\n\n### 2. 包裹维度处理\n1. `search_package_list.py`：传 `pagination.page_size` 及可选 `filter`/`sort`（或整体 `body`）\n2. `get_package_detail.py`：`package_number_list`\n3. 发货物流见 Logistics 模块（非本 skill）\n\n### 3. 取消 / 备注 / 拆单\n- 取消：`cancel_order.py`（`order_sn` + `cancel_reason`）\n- 买家取消申请：`handle_buyer_cancellation.py`（`ACCEPT`/`REJECT`）\n- 备注：`set_note.py`\n- 拆单/合单：`split_order.py` / `unsplit_order.py`\n\n### 4. 选店（高频）\n\n| 用户上下文 | Agent 动作 |\n|---|---|\n| 只授权 1 家 | 直接用 `shopId` |\n| 多家 + 店名 | auth skill `authorized_stores.py` 澄清 |\n| 已给 order_sn | 直接详情/写操作脚本 |\n\n## 调用原则\n\n- 先看 **`developerProxy.httpStatus`**，再读 `*Response` 解析字段\n- GET：业务参数作为脚本 JSON 顶层字段（runner 拼 `queryString`）\n- POST：传 `body` 对象，或按 api.md 传顶层 body 字段\n- `upload_invoice_doc` 官方为 **multipart**；若网关不支持，需在文档中说明限制\n- 分页：`get_order_list` 用 `cursor`/`next_cursor`；`search_package_list` 用 `pagination.cursor`\n\n## 常见问题\n\n### 1005 path 白名单\n\n确认 path 为 `api/v2/order/...`。\n\n### 区域限制\n\n发票类 API 限 PH/BR；`get_buyer_invoice_info` 限 VN/TH/PH；FBS 发票限 BR。见 `references/api.md`。\n\n### token 过期\n\n回到 **`linkfox-shopee-store-auth`** 重新授权。\n\n## Not Applicable\n\n- 店铺授权 → `linkfox-shopee-store-auth`\n- 商户信息 → `linkfox-shopee-store-merchant`\n- 店铺信息与设置 → `linkfox-shopee-store-shop`\n- 商品 listing → `linkfox-shopee-store-product`\n- 账户健康 Account Health → `linkfox-shopee-store-account-health`\n- 跨境全球商品 → `linkfox-shopee-store-global-product`\n- 物流发货 → `linkfox-shopee-store-logistics`\n- 头程 FirstMile → `linkfox-shopee-store-first-mile`\n- 退货退款 → `linkfox-shopee-store-returns`\n- 支付结算 → `linkfox-shopee-store-payment`\n- 选品 → `linkfox-youying-shopee-product-search`\n\n## 积分消耗规则\n\n不消耗积分。\n\n**Feedback:**\n\nAuto-detect and report feedback via the Feedback API when any of the following apply:\n1. The functionality or purpose described in this skill does not match actual behavior\n2. The skill's results do not match the user's intent\n3. The user expresses dissatisfaction or praise about this skill\n4. Anything you believe could be improved\n\nCall the feedback API as specified in `references/api.md`. Do not interrupt the user's flow.\n\n\n---\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-orders\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1786100710259\n}\n\nFile v1.0.4:references/api.md\n\n# linkfox-shopee-store-orders — 参数与字段参考\r\n\r\n> 单接口入参/响应说明已拆到 **`apis/`**（按 API 一份）；本文件保留模块总览与 Feedback。\r\nShopee **Order 模块**全部 22 个 API，经 **`POST /shopee/developerProxy`** 转发。\r\n\r\n授权见 **`linkfox-shopee-store-auth`**。官方文档：[Order module](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1)\r\n\r\n## 通用约定\r\n\r\n- **Base URL**：`https://tool-gateway.linkfox.com`\r\n- **Method**：POST（网关），上游 Method 见各接口\r\n- **Auth**：Header `Authorization: <api_key>`（`LINKFOXAGENT_API_KEY`）\r\n- **流程**：`POST /shopee/storeTokens` → `POST /shopee/developerProxy`\r\n- **path**：须 `api/v2/order/...`（不含域名）\r\n- **紫鸟代理**：自动追加 `partner_id`、`timestamp`、`sign`；`access_token`/`shop_id` 由 `developerProxy` 写入\r\n\r\n**developerProxy Request**：\r\n| 参数 | 必填 | 说明 |\r\n|------|------|------|\r\n| `path` | 是 | 如 `api/v2/order/get_order_list` |\r\n| `method` | 是 | `GET` / `POST` |\r\n| `accessToken` | 是 | 店铺 token |\r\n| `shopId` / `merchantId` | 二选一 | 转发为 `shop_id` / `merchant_id` |\r\n| `queryString` | GET 时 | 业务 query，不含 `?` |\r\n| `body` | POST 时 | JSON 字符串 |\r\n| `contentType` | 否 | 默认 `application/json` |\r\n\r\n**developerProxy Response**：\r\n```json\r\n{\"httpStatus\": 200, \"contentType\": \"application/json\", \"body\": \"{\\\"error\\\":\\\"\\\",\\\"response\\\":{...}}\"}\r\n```\r\n\r\n脚本在 `httpStatus==200` 时解析 `body` 为 `{responseKey}` / `{responseKey}Response`。\r\n\r\n---\r\n\r\n## Order 模块总览\r\n\r\n| # | API | Method | path | 脚本 | 官方文档 |\r\n|---|-----|--------|------|------|----------|\r\n| 1 | get_order_list | GET | `api/v2/order/get_order_list` | `get_order_list.py` | [apis/get-order-list.md](./apis/get-order-list.md) |\r\n| 2 | get_order_detail | GET | `api/v2/order/get_order_detail` | `get_order_detail.py` | [apis/get-order-detail.md](./apis/get-order-detail.md) |\r\n| 3 | get_shipment_list | GET | `api/v2/order/get_shipment_list` | `get_shipment_list.py` | [apis/get-shipment-list.md](./apis/get-shipment-list.md) |\r\n| 4 | search_package_list | POST | `api/v2/order/search_package_list` | `search_package_list.py` | [apis/search-package-list.md](./apis/search-package-list.md) |\r\n| 5 | get_package_detail | GET | `api/v2/order/get_package_detail` | `get_package_detail.py` | [apis/get-package-detail.md](./apis/get-package-detail.md) |\r\n| 6 | split_order | POST | `api/v2/order/split_order` | `split_order.py` | [apis/split-order.md](./apis/split-order.md) |\r\n| 7 | unsplit_order | POST | `api/v2/order/unsplit_order` | `unsplit_order.py` | [apis/unsplit-order.md](./apis/unsplit-order.md) |\r\n| 8 | cancel_order | POST | `api/v2/order/cancel_order` | `cancel_order.py` | [apis/cancel-order.md](./apis/cancel-order.md) |\r\n| 9 | handle_buyer_cancellation | POST | `api/v2/order/handle_buyer_cancellation` | `handle_buyer_cancellation.py` | [apis/handle-buyer-cancellation.md](./apis/handle-buyer-cancellation.md) |\r\n| 10 | set_note | POST | `api/v2/order/set_note` | `set_note.py` | [apis/set-note.md](./apis/set-note.md) |\r\n| 11 | get_pending_buyer_invoice_order_list | GET | `api/v2/order/get_pending_buyer_invoice_order_list` | `get_pending_buyer_invoice_order_list.py` | [apis/get-pending-buyer-invoice-order-list.md](./apis/get-pending-buyer-invoice-order-list.md) |\r\n| 12 | get_buyer_invoice_info | POST | `api/v2/order/get_buyer_invoice_info` | `get_buyer_invoice_info.py` | [apis/get-buyer-invoice-info.md](./apis/get-buyer-invoice-info.md) |\r\n| 13 | upload_invoice_doc | POST | `api/v2/order/upload_invoice_doc` | `upload_invoice_doc.py` | [apis/upload-invoice-doc.md](./apis/upload-invoice-doc.md) |\r\n| 14 | download_invoice_doc | GET | `api/v2/order/download_invoice_doc` | `download_invoice_doc.py` | [apis/download-invoice-doc.md](./apis/download-invoice-doc.md) |\r\n| 15 | handle_prescription_check | POST | `api/v2/order/handle_prescription_check` | `handle_prescription_check.py` | [apis/handle-prescription-check.md](./apis/handle-prescription-check.md) |\r\n| 16 | get_warehouse_filter_config | GET | `api/v2/order/get_warehouse_filter_config` | `get_warehouse_filter_config.py` | [apis/get-warehouse-filter-config.md](./apis/get-warehouse-filter-config.md) |\r\n| 17 | get_booking_list | GET | `api/v2/order/get_booking_list` | `get_booking_list.py` | [apis/get-booking-list.md](./apis/get-booking-list.md) |\r\n| 18 | get_booking_detail | GET | `api/v2/order/get_booking_detail` | `get_booking_detail.py` | [apis/get-booking-detail.md](./apis/get-booking-detail.md) |\r\n| 19 | generate_fbs_invoices | POST | `api/v2/order/generate_fbs_invoices` | `generate_fbs_invoices.py` | [apis/generate-fbs-invoices.md](./apis/generate-fbs-invoices.md) |\r\n| 20 | get_fbs_invoices_result | POST | `api/v2/order/get_fbs_invoices_result` | `get_fbs_invoices_result.py` | [apis/get-fbs-invoices-result.md](./apis/get-fbs-invoices-result.md) |\r\n| 21 | download_fbs_invoices | POST | `api/v2/order/download_fbs_invoices` | `download_fbs_invoices.py` | [apis/download-fbs-invoices.md](./apis/download-fbs-invoices.md) |\r\n| 22 | get_estimiate_cancel_value | POST | `api/v2/order/get_estimiate_cancel_value` | `get_estimiate_cancel_value.py` | [apis/get-estimiate-cancel-value.md](./apis/get-estimiate-cancel-value.md) |\r\n\r\n通用入口：`order_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\r\n\r\n---\r\n\r\n## Feedback API\r\n\r\n```bash\r\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\"skillName\":\"linkfox-shopee-store-orders\",\"sentiment\":\"POSITIVE\",\r\n       \"category\":\"OTHER\",\"content\":\"订单接口正常\"}'\r\n```\n\nFile v1.0.4:references/apis/cancel-order.md\n\n# cancel_order\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/cancel_order.py` |\n| Method / path | POST `api/v2/order/cancel_order` |\n| 官方文档 | [cancel_order](https://open.shopee.com/documents/v2/v2.order.cancel_order?module=94&type=1) |\n| 用途 | cancel_reason: OUT_OF_STOCK/CUSTOMER_REQUEST/UNDELIVERABLE_AREA/COD_NOT_SUPPORTED |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `order_sn` | — | 是 | 见 notes / 官方文档 |\n| `cancel_reason` | — | 是 | 见 notes / 官方文档 |\n| `item_list` | — | 否（POST body） | 见 notes / 官方文档 |\n| `partial_cancel_item_list` | — | 否（POST body） | 见 notes / 官方文档 |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：cancel_reason: OUT_OF_STOCK/CUSTOMER_REQUEST/UNDELIVERABLE_AREA/COD_NOT_SUPPORTED\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/cancel_order.py '{\"shopId\": \"67890\", \"order_sn\": \"<order_sn>\", \"cancel_reason\": \"<cancel_reason>\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"cancel_order\", \"shopId\": \"67890\", \"order_sn\": \"<order_sn>\", \"cancel_reason\": \"<cancel_reason>\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`cancelOrder`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.cancel_order?module=94&type=1)\n\n**Body（必填）**：`order_sn`、`cancel_reason`\n\n**Body（可选）**：`item_list`、`partial_cancel_item_list`（`item_id`、`model_id`、`model_quantity` 等）\n\n**cancel_reason**：`OUT_OF_STOCK`、`CUSTOMER_REQUEST`、`UNDELIVERABLE_AREA`（TW/MY）、`COD_NOT_SUPPORTED`\n\n---\n\nFile v1.0.4:references/apis/download-fbs-invoices.md\n\n# download_fbs_invoices\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/download_fbs_invoices.py` |\n| Method / path | POST `api/v2/order/download_fbs_invoices` |\n| 官方文档 | [download_fbs_invoices](https://open.shopee.com/documents/v2/v2.order.download_fbs_invoices?module=94&type=1) |\n| 用途 | Download link expires in 30 minutes |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `request_id_list` | — | 否（POST body） | 见 notes / 官方文档 |\n| `request_id_list` | object | 否（可嵌在 body） | 嵌套对象；或整体传 `body` / `requestBody` |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Download link expires in 30 minutes\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/download_fbs_invoices.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"download_fbs_invoices\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`downloadFbsInvoices`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.download_fbs_invoices?module=94&type=1)\n\n**Body（必填）**：`request_id_list.request_id`（int 数组）\n\n**说明**：需先 `generate_fbs_invoices` → 本接口轮询结果 → 下载；链接 30 分钟过期。\n\n---\n\nFile v1.0.4:references/apis/download-invoice-doc.md\n\n# download_invoice_doc\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/download_invoice_doc.py` |\n| Method / path | GET `api/v2/order/download_invoice_doc` |\n| 官方文档 | [download_invoice_doc](https://open.shopee.com/documents/v2/v2.order.download_invoice_doc?module=94&type=1) |\n| 用途 | PH/BR |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `order_sn` | — | **是** | Query 必填（见 notes / 官方文档） |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：PH/BR\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/download_invoice_doc.py '{\"shopId\": \"67890\", \"order_sn\": \"<order_sn>\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"download_invoice_doc\", \"shopId\": \"67890\", \"order_sn\": \"<order_sn>\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`downloadInvoiceDoc`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.download_invoice_doc?module=94&type=1)\n\n**Query（必填）**：`order_sn`\n\n**区域**：PH、BR\n\n---\n\nFile v1.0.4:references/apis/generate-fbs-invoices.md\n\n# generate_fbs_invoices\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/generate_fbs_invoices.py` |\n| Method / path | POST `api/v2/order/generate_fbs_invoices` |\n| 官方文档 | [generate_fbs_invoices](https://open.shopee.com/documents/v2/v2.order.generate_fbs_invoices?module=94&type=1) |\n| 用途 | BR FBS; batch_download.start/end YYYYMMDD |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `batch_download` | — | 否（POST body） | 见 notes / 官方文档 |\n| `batch_download` | object | 否（可嵌在 body） | 嵌套对象；或整体传 `body` / `requestBody` |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：BR FBS; batch_download.start/end YYYYMMDD\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/generate_fbs_invoices.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"generate_fbs_invoices\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`generateFbsInvoices`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.generate_fbs_invoices?module=94&type=1)\n\n**Body（必填）**：`batch_download`（`start`/`end` YYYYMMDD、`document_type`、`file_type`；可选 `document_status`）\n\n**区域**：BR FBS\n\n---\n\nFile v1.0.4:references/apis/get-booking-detail.md\n\n# get_booking_detail\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_booking_detail.py` |\n| Method / path | GET `api/v2/order/get_booking_detail` |\n| 官方文档 | [get_booking_detail](https://open.shopee.com/documents/v2/v2.order.get_booking_detail?module=94&type=1) |\n| 用途 | booking_sn_list: comma-separated, max 50 |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `booking_sn_list` | — | **是** | Query 必填（见 notes / 官方文档） |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：booking_sn_list: comma-separated, max 50\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_booking_detail.py '{\"shopId\": \"67890\", \"booking_sn_list\": \"<booking_sn_list>\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"get_booking_detail\", \"shopId\": \"67890\", \"booking_sn_list\": \"<booking_sn_list>\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getBookingDetail`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_booking_detail?module=94&type=1)\n\n**Query（必填）**：`booking_sn_list`（逗号分隔，1–50 个）\n\n**Query（可选）**：`response_optional_fields`\n\n---\n\nFile v1.0.4:references/apis/get-booking-list.md\n\n# get_booking_list\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_booking_list.py` |\n| Method / path | GET `api/v2/order/get_booking_list` |\n| 官方文档 | [get_booking_list](https://open.shopee.com/documents/v2/v2.order.get_booking_list?module=94&type=1) |\n| 用途 | booking_status optional: READY_TO_SHIP/PROCESSED/SHIPPED/CANCELLED/MATCHED |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `time_range_field` | — | **是** | Query 必填（见 notes / 官方文档） |\n| `page_size` | — | **是** | Query 必填（见 notes / 官方文档） |\n| `time_to` | — | **是** | Query 必填（见 notes / 官方文档） |\n| `time_from` | — | **是** | Query 必填（见 notes / 官方文档） |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：booking_status optional: READY_TO_SHIP/PROCESSED/SHIPPED/CANCELLED/MATCHED\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_booking_list.py '{\"shopId\": \"67890\", \"time_range_field\": \"<time_range_field>\", \"time_from\": \"<time_from>\", \"time_to\": \"<time_to>\", \"page_size\": 20}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"get_booking_list\", \"shopId\": \"67890\", \"time_range_field\": \"<time_range_field>\", \"time_from\": \"<time_from>\", \"time_to\": \"<time_to>\", \"page_size\": 20}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getBookingList`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_booking_list?module=94&type=1)\n\n**Query（必填）**：`time_range_field`、`time_from`、`time_to`、`page_size`\n\n**Query（可选）**：`cursor`、`booking_status`（`READY_TO_SHIP`/`PROCESSED`/`SHIPPED`/`CANCELLED`/`MATCHED`）\n\n---\n\nFile v1.0.4:references/apis/get-buyer-invoice-info.md\n\n# get_buyer_invoice_info\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_buyer_invoice_info.py` |\n| Method / path | POST `api/v2/order/get_buyer_invoice_info` |\n| 官方文档 | [get_buyer_invoice_info](https://open.shopee.com/documents/v2/v2.order.get_buyer_invoice_info?module=94&type=1) |\n| 用途 | VN/TH/PH local sellers |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `queries` | — | 是 | 见 notes / 官方文档 |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：VN/TH/PH local sellers\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_buyer_invoice_info.py '{\"shopId\": \"67890\", \"queries\": \"<queries>\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"get_buyer_invoice_info\", \"shopId\": \"67890\", \"queries\": \"<queries>\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getBuyerInvoiceInfo`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_buyer_invoice_info?module=94&type=1)\n\n**Body（必填）**：`queries[]`（含 `order_sn`）\n\n**区域**：VN、TH、PH 本地卖家\n\n---\n\nFile v1.0.4:references/apis/get-estimiate-cancel-value.md\n\n# get_estimiate_cancel_value\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_estimiate_cancel_value.py` |\n| Method / path | POST `api/v2/order/get_estimiate_cancel_value` |\n| 官方文档 | [get_estimiate_cancel_value](https://open.shopee.com/documents/v2/v2.order.get_estimiate_cancel_value?module=94&type=1) |\n| 用途 | Official spelling: estimiate (not estimate) |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `order_sn` | — | 是 | 见 notes / 官方文档 |\n| `partial_cancel_item_list` | — | 是 | 见 notes / 官方文档 |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Official spelling: estimiate (not estimate)\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_estimiate_cancel_value.py '{\"shopId\": \"67890\", \"order_sn\": \"<order_sn>\", \"partial_cancel_item_list\": \"<partial_cancel_item_list>\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"get_estimiate_cancel_value\", \"shopId\": \"67890\", \"order_sn\": \"<order_sn>\", \"partial_cancel_item_list\": \"<partial_cancel_item_list>\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getEstimiateCancelValue`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_estimiate_cancel_value?module=94&type=1)\n\n> 官方 API 名拼写为 **estimiate**（非 estimate）。\n\n**Body（必填）**：`order_sn`、`partial_cancel_item_list[]`（`item_id`、`model_id`、`model_quantity`；可选 `order_item_id`、`promotion_group_id`）\n\n---\n\n## 网关错误码\n\n| errcode | 含义 | 建议 |\n|---------|------|------|\n| 1002 | 参数/未登录 | 检查 shopId 与 API Key |\n| 1003 | 代理/网络异常 | 重试 |\n| 1004 | 无授权记录 | auth skill |\n| 1005 | path 未白名单 | 确认 `api/v2/order/...` |\n\n紫鸟代理 HTTP：`400` 路径错误、`403` IP 白名单、`408` 超时、`5xx` 上游透传。\n\n---\n\nFile v1.0.4:references/apis/get-fbs-invoices-result.md\n\n# get_fbs_invoices_result\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_fbs_invoices_result.py` |\n| Method / path | POST `api/v2/order/get_fbs_invoices_result` |\n| 官方文档 | [get_fbs_invoices_result](https://open.shopee.com/documents/v2/v2.order.get_fbs_invoices_result?module=94&type=1) |\n| 用途 | Shopee Open API `get_fbs_invoices_result` |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `request_id_list` | — | 否（POST body） | 见 notes / 官方文档 |\n| `request_id_list` | object | 否（可嵌在 body） | 嵌套对象；或整体传 `body` / `requestBody` |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/get_fbs_invoices_result.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"get_fbs_invoices_result\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getFbsInvoicesResult`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_fbs_invoices_result?module=94&type=1)\n\n**Body（必填）**：`request_id_list.request_id`（int 数组）\n\n---\n\nArchive v1.0.3: 31 files, 33197 bytes\n\nFiles: references/api.md (14809b), scripts/_order_api_runner.py (5540b), scripts/_order_endpoints.py (7445b), scripts/_shopee_orders_common.py (11825b), scripts/cancel_order.py (685b), scripts/check_auth_dependency.py (3979b), scripts/download_fbs_invoices.py (739b), scripts/download_invoice_doc.py (733b), scripts/generate_fbs_invoices.py (739b), scripts/get_booking_detail.py (721b), scripts/get_booking_list.py (709b), scripts/get_buyer_invoice_info.py (745b), scripts/get_estimiate_cancel_value.py (769b), scripts/get_fbs_invoices_result.py (751b), scripts/get_order_detail.py (709b), scripts/get_order_list.py (697b), scripts/get_package_detail.py (721b), scripts/get_pending_buyer_invoice_order_list.py (829b), scripts/get_shipment_list.py (715b), scripts/get_warehouse_filter_config.py (775b), scripts/handle_buyer_cancellation.py (763b), scripts/handle_prescription_check.py (763b), scripts/order_api.py (1388b), scripts/search_package_list.py (727b), scripts/set_note.py (661b), scripts/split_order.py (679b), scripts/unsplit_order.py (691b), scripts/upload_invoice_doc.py (721b), skill-card.md (2921b), SKILL.md (8775b), _meta.json (146b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: linkfox-shopee-store-orders\ndescription: Shopee（虾皮）店铺订单（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Order 模块全部 22 个接口：get_order_list、get_order_detail、get_shipment_list、search_package_list、cancel_order、ship 相关 booking/invoice/FBS 等。当用户提到 Shopee 订单、虾皮订单列表、订单详情、包裹、拆单、取消订单、买家取消、订单备注、booking、FBS 发票、order_sn、READY_TO_SHIP、Shopee order processing 时触发。即使未明确提及\"订单\"，只要涉及已授权 Shopee 店铺的订单查询或订单处理，也应触发。\n---\n\n# Shopee 店铺 Orders\n\nShopee Open Platform **Order 模块**（22 个 API）。**依赖 `linkfox-shopee-store-auth`**：先取 `accessToken`，再经 **`POST /shopee/developerProxy`** 转发（`path` 须 `api/v2/order/...`）。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<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\nOrder 模块索引：[Shopee Open Platform — Order](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1)\n\n---\n\n## Prerequisites（必须先读）\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`** 并授权店铺。\n2. **不要**在本 skill 内实现授权/令牌逻辑。\n\n---\n\n## Core Concepts\n\n- **转发链路**：`storeTokens` → `developerProxy` → 紫鸟 `shopee-proxy` → Shopee API（`partner_id`/`sign` 由代理自动处理）\n- **列表 → 详情**：`get_order_list` 得 `order_sn` → `get_order_detail` 拉全量字段（≤50 个/次）\n- **包裹流**：`search_package_list` / `get_package_detail` / `get_shipment_list` 用于发货前包裹视图\n- **写操作**：`split_order`、`cancel_order`、`set_note` 等为 **POST JSON body**\n- **时间窗**：`get_order_list` / `get_booking_list` 的 `time_from`/`time_to` 最大 **15 天**\n\n## 可用脚本（Order 模块 22 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `get_order_list.py` | get_order_list | GET |\n| `get_order_detail.py` | get_order_detail | GET |\n| `get_shipment_list.py` | get_shipment_list | GET |\n| `search_package_list.py` | search_package_list | POST |\n| `get_package_detail.py` | get_package_detail | GET |\n| `split_order.py` | split_order | POST |\n| `unsplit_order.py` | unsplit_order | POST |\n| `cancel_order.py` | cancel_order | POST |\n| `handle_buyer_cancellation.py` | handle_buyer_cancellation | POST |\n| `set_note.py` | set_note | POST |\n| `get_pending_buyer_invoice_order_list.py` | get_pending_buyer_invoice_order_list | GET |\n| `get_buyer_invoice_info.py` | get_buyer_invoice_info | POST |\n| `upload_invoice_doc.py` | upload_invoice_doc | POST |\n| `download_invoice_doc.py` | download_invoice_doc | GET |\n| `handle_prescription_check.py` | handle_prescription_check | POST |\n| `get_warehouse_filter_config.py` | get_warehouse_filter_config | GET |\n| `get_booking_list.py` | get_booking_list | GET |\n| `get_booking_detail.py` | get_booking_detail | GET |\n| `generate_fbs_invoices.py` | generate_fbs_invoices | POST |\n| `get_fbs_invoices_result.py` | get_fbs_invoices_result | POST |\n| `download_fbs_invoices.py` | download_fbs_invoices | POST |\n| `get_estimiate_cancel_value.py` | get_estimiate_cancel_value | POST |\n| `order_api.py` | 通用入口（JSON 含 `api` 字段） | — |\n\n共享：`_shopee_orders_common.py`、`_order_endpoints.py`、`_order_api_runner.py`。入参详见 `references/api.md`。\n\n## Usage Scenarios\n\n### 1. 查待发货订单\n1. auth skill 定位 `shopId`\n2. `get_order_list.py`：`order_status=READY_TO_SHIP`，`time_range_field=update_time`，15 天内时间戳\n3. `get_order_detail.py`：传入 `order_sn_list`\n\n### 2. 包裹维度处理\n1. `search_package_list.py`：传 `pagination.page_size` 及可选 `filter`/`sort`（或整体 `body`）\n2. `get_package_detail.py`：`package_number_list`\n3. 发货物流见 Logistics 模块（非本 skill）\n\n### 3. 取消 / 备注 / 拆单\n- 取消：`cancel_order.py`（`order_sn` + `cancel_reason`）\n- 买家取消申请：`handle_buyer_cancellation.py`（`ACCEPT`/`REJECT`）\n- 备注：`set_note.py`\n- 拆单/合单：`split_order.py` / `unsplit_order.py`\n\n### 4. 选店（高频）\n\n| 用户上下文 | Agent 动作 |\n|---|---|\n| 只授权 1 家 | 直接用 `shopId` |\n| 多家 + 店名 | auth skill `authorized_stores.py` 澄清 |\n| 已给 order_sn | 直接详情/写操作脚本 |\n\n## 调用原则\n\n- 先看 **`developerProxy.httpStatus`**，再读 `*Response` 解析字段\n- GET：业务参数作为脚本 JSON 顶层字段（runner 拼 `queryString`）\n- POST：传 `body` 对象，或按 api.md 传顶层 body 字段\n- `upload_invoice_doc` 官方为 **multipart**；若网关不支持，需在文档中说明限制\n- 分页：`get_order_list` 用 `cursor`/`next_cursor`；`search_package_list` 用 `pagination.cursor`\n\n## 常见问题\n\n### 1005 path 白名单\n\n确认 path 为 `api/v2/order/...`。\n\n### 区域限制\n\n发票类 API 限 PH/BR；`get_buyer_invoice_info` 限 VN/TH/PH；FBS 发票限 BR。见 `references/api.md`。\n\n### token 过期\n\n回到 **`linkfox-shopee-store-auth`** 重新授权。\n\n## Not Applicable\n\n- 店铺授权 → `linkfox-shopee-store-auth`\n- 商户信息 → `linkfox-shopee-store-merchant`\n- 店铺信息与设置 → `linkfox-shopee-store-shop`\n- 商品 listing → `linkfox-shopee-store-product`\n- 账户健康 Account Health → `linkfox-shopee-store-account-health`\n- 跨境全球商品 → `linkfox-shopee-store-global-product`\n- 物流发货 → `linkfox-shopee-store-logistics`\n- 头程 FirstMile → `linkfox-shopee-store-first-mile`\n- 退货退款 → `linkfox-shopee-store-returns`\n- 支付结算 → `linkfox-shopee-store-payment`\n- 选品 → `linkfox-youying-shopee-product-search`\n\n## 积分消耗规则\n\n不消耗积分。\n\n**Feedback:**\n\nAuto-detect and report feedback via the Feedback API when any of the following apply:\n1. The functionality or purpose described in this skill does not match actual behavior\n2. The skill's results do not match the user's intent\n3. The user expresses dissatisfaction or praise about this skill\n4. Anything you believe could be improved\n\nCall the feedback API as specified in `references/api.md`. Do not interrupt the user's flow.\n\n\n---\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-orders\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1783945410287\n}\n\nFile v1.0.3:references/api.md\n\n# linkfox-shopee-store-orders — 参数与字段参考\r\n\r\nShopee **Order 模块**全部 22 个 API，经 **`POST /shopee/developerProxy`** 转发。\r\n\r\n授权见 **`linkfox-shopee-store-auth`**。官方文档：[Order module](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1)\r\n\r\n## 通用约定\r\n\r\n- **Base URL**：`${LINKFOX_TOOL_GATEWAY}`\r\n- **Method**：POST（网关），上游 Method 见各接口\r\n- **Auth**：Header `Authorization: <api_key>`（从 `LINKFOX_AGENT_API_KEY` 或 `LINKFOXAGENT_API_KEY` 读取）（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理）\r\n- **流程**：`POST /shopee/storeTokens` → `POST /shopee/developerProxy`\r\n- **path**：须 `api/v2/order/...`（不含域名）\r\n- **紫鸟代理**：自动追加 `partner_id`、`timestamp`、`sign`；`access_token`/`shop_id` 由 `developerProxy` 写入\r\n\r\n**developerProxy Request**：\r\n| 参数 | 必填 | 说明 |\r\n|------|------|------|\r\n| `path` | 是 | 如 `api/v2/order/get_order_list` |\r\n| `method` | 是 | `GET` / `POST` |\r\n| `accessToken` | 是 | 店铺 token |\r\n| `shopId` / `merchantId` | 二选一 | 转发为 `shop_id` / `merchant_id` |\r\n| `queryString` | GET 时 | 业务 query，不含 `?` |\r\n| `body` | POST 时 | JSON 字符串 |\r\n| `contentType` | 否 | 默认 `application/json` |\r\n\r\n**developerProxy Response**：\r\n```json\r\n{\"httpStatus\": 200, \"contentType\": \"application/json\", \"body\": \"{\\\"error\\\":\\\"\\\",\\\"response\\\":{...}}\"}\r\n```\r\n\r\n脚本在 `httpStatus==200` 时解析 `body` 为 `{responseKey}` / `{responseKey}Response`。\r\n\r\n---\r\n\r\n## Order 模块总览\r\n\r\n| # | API | Method | path | 脚本 | 官方文档 |\r\n|---|-----|--------|------|------|----------|\r\n| 1 | get_order_list | GET | `api/v2/order/get_order_list` | `get_order_list.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1) |\r\n| 2 | get_order_detail | GET | `api/v2/order/get_order_detail` | `get_order_detail.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_order_detail?module=94&type=1) |\r\n| 3 | get_shipment_list | GET | `api/v2/order/get_shipment_list` | `get_shipment_list.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_shipment_list?module=94&type=1) |\r\n| 4 | search_package_list | POST | `api/v2/order/search_package_list` | `search_package_list.py` | [doc](https://open.shopee.com/documents/v2/v2.order.search_package_list?module=94&type=1) |\r\n| 5 | get_package_detail | GET | `api/v2/order/get_package_detail` | `get_package_detail.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_package_detail?module=94&type=1) |\r\n| 6 | split_order | POST | `api/v2/order/split_order` | `split_order.py` | [doc](https://open.shopee.com/documents/v2/v2.order.split_order?module=94&type=1) |\r\n| 7 | unsplit_order | POST | `api/v2/order/unsplit_order` | `unsplit_order.py` | [doc](https://open.shopee.com/documents/v2/v2.order.unsplit_order?module=94&type=1) |\r\n| 8 | cancel_order | POST | `api/v2/order/cancel_order` | `cancel_order.py` | [doc](https://open.shopee.com/documents/v2/v2.order.cancel_order?module=94&type=1) |\r\n| 9 | handle_buyer_cancellation | POST | `api/v2/order/handle_buyer_cancellation` | `handle_buyer_cancellation.py` | [doc](https://open.shopee.com/documents/v2/v2.order.handle_buyer_cancellation?module=94&type=1) |\r\n| 10 | set_note | POST | `api/v2/order/set_note` | `set_note.py` | [doc](https://open.shopee.com/documents/v2/v2.order.set_note?module=94&type=1) |\r\n| 11 | get_pending_buyer_invoice_order_list | GET | `api/v2/order/get_pending_buyer_invoice_order_list` | `get_pending_buyer_invoice_order_list.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_pending_buyer_invoice_order_list?module=94&type=1) |\r\n| 12 | get_buyer_invoice_info | POST | `api/v2/order/get_buyer_invoice_info` | `get_buyer_invoice_info.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_buyer_invoice_info?module=94&type=1) |\r\n| 13 | upload_invoice_doc | POST | `api/v2/order/upload_invoice_doc` | `upload_invoice_doc.py` | [doc](https://open.shopee.com/documents/v2/v2.order.upload_invoice_doc?module=94&type=1) |\r\n| 14 | download_invoice_doc | GET | `api/v2/order/download_invoice_doc` | `download_invoice_doc.py` | [doc](https://open.shopee.com/documents/v2/v2.order.download_invoice_doc?module=94&type=1) |\r\n| 15 | handle_prescription_check | POST | `api/v2/order/handle_prescription_check` | `handle_prescription_check.py` | [doc](https://open.shopee.com/documents/v2/v2.order.handle_prescription_check?module=94&type=1) |\r\n| 16 | get_warehouse_filter_config | GET | `api/v2/order/get_warehouse_filter_config` | `get_warehouse_filter_config.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_warehouse_filter_config?module=94&type=1) |\r\n| 17 | get_booking_list | GET | `api/v2/order/get_booking_list` | `get_booking_list.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_booking_list?module=94&type=1) |\r\n| 18 | get_booking_detail | GET | `api/v2/order/get_booking_detail` | `get_booking_detail.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_booking_detail?module=94&type=1) |\r\n| 19 | generate_fbs_invoices | POST | `api/v2/order/generate_fbs_invoices` | `generate_fbs_invoices.py` | [doc](https://open.shopee.com/documents/v2/v2.order.generate_fbs_invoices?module=94&type=1) |\r\n| 20 | get_fbs_invoices_result | POST | `api/v2/order/get_fbs_invoices_result` | `get_fbs_invoices_result.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_fbs_invoices_result?module=94&type=1) |\r\n| 21 | download_fbs_invoices | POST | `api/v2/order/download_fbs_invoices` | `download_fbs_invoices.py` | [doc](https://open.shopee.com/documents/v2/v2.order.download_fbs_invoices?module=94&type=1) |\r\n| 22 | get_estimiate_cancel_value | POST | `api/v2/order/get_estimiate_cancel_value` | `get_estimiate_cancel_value.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_estimiate_cancel_value?module=94&type=1) |\r\n\r\n通用入口：`order_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\r\n\r\n---\r\n\r\n## 1. get_order_list\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1)\r\n\r\n**Query（必填）**：`time_range_field`（`create_time`|`update_time`）、`time_from`、`time_to`（Unix 秒，跨度 ≤15 天）、`page_size`（1–100）\r\n\r\n**Query（可选）**：`cursor`、`order_status`（`UNPAID`/`READY_TO_SHIP`/`PROCESSED`/`SHIPPED`/`COMPLETED`/`IN_CANCEL`/`CANCELLED`/`INVOICE_PENDING`）、`response_optional_fields`、`request_order_status_pending`、`logistics_channel_id`（仅 BR）\r\n\r\n**Response**：`more`、`next_cursor`、`order_list[]`（含 `order_sn`）\r\n\r\n---\r\n\r\n## 2. get_order_detail\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_order_detail?module=94&type=1)\r\n\r\n**Query（必填）**：`order_sn_list`（逗号分隔或数组，1–50 个）\r\n\r\n**Query（可选）**：`response_optional_fields`、`request_order_status_pending`\r\n\r\n**Response**：`order_list[]`（`order_sn`、`order_status`、`total_amount`、`item_list`、`recipient_address` 等）\r\n\r\n---\r\n\r\n## 3. get_shipment_list\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_shipment_list?module=94&type=1)\r\n\r\n**Query（必填）**：`page_size`（1–100）\r\n\r\n**Query（可选）**：`cursor`\r\n\r\n**说明**：返回可开始发货流程的 `READY_TO_SHIP` 订单/包裹。\r\n\r\n---\r\n\r\n## 4. search_package_list\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.search_package_list?module=94&type=1)\r\n\r\n**Body（必填）**：`pagination.page_size`（1–100）\r\n\r\n**Body（可选）**：\r\n- `filter`：`package_status`、`product_location_ids`、`logistics_channel_ids`、`fulfillment_type`、`invoice_pending`、`sorting_group`（TW）、`order_type`、`is_pre_order`、`shipping_priority`\r\n- `pagination.cursor`\r\n- `sort`：`sort_type`（1=ShipByDate/2=CreateDate/3=ConfirmedDate）、`ascending`\r\n\r\n**示例**：\r\n```json\r\n{\r\n  \"shopId\": \"67890\",\r\n  \"filter\": {\"package_status\": 2, \"fulfillment_type\": 2},\r\n  \"pagination\": {\"page_size\": 20, \"cursor\": \"\"},\r\n  \"sort\": {\"sort_type\": 1, \"ascending\": false}\r\n}\r\n```\r\n\r\n---\r\n\r\n## 5. get_package_detail\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_package_detail?module=94&type=1)\r\n\r\n**Query（必填）**：`package_number_list`（逗号分隔，1–50 个）\r\n\r\n---\r\n\r\n## 6. split_order\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.split_order?module=94&type=1)\r\n\r\n**Body（必填）**：`order_sn`、`package_list[]`（含 `item_list[]`：`item_id`、`model_id`；可选 `order_item_id`、`promotion_group_id`、`model_quantity`）\r\n\r\n---\r\n\r\n## 7. unsplit_order\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.unsplit_order?module=94&type=1)\r\n\r\n**Body（必填）**：`order_sn`（仅 `READY_TO_SHIP` 且未发货的已拆分订单）\r\n\r\n---\r\n\r\n## 8. cancel_order\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.cancel_order?module=94&type=1)\r\n\r\n**Body（必填）**：`order_sn`、`cancel_reason`\r\n\r\n**Body（可选）**：`item_list`、`partial_cancel_item_list`（`item_id`、`model_id`、`model_quantity` 等）\r\n\r\n**cancel_reason**：`OUT_OF_STOCK`、`CUSTOMER_REQUEST`、`UNDELIVERABLE_AREA`（TW/MY）、`COD_NOT_SUPPORTED`\r\n\r\n---\r\n\r\n## 9. handle_buyer_cancellation\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.handle_buyer_cancellation?module=94&type=1)\r\n\r\n**Body（必填）**：`order_sn`、`operation`（`ACCEPT`|`REJECT`）\r\n\r\n---\r\n\r\n## 10. set_note\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.set_note?module=94&type=1)\r\n\r\n**Body（必填）**：`order_sn`、`note`\r\n\r\n---\r\n\r\n## 11. get_pending_buyer_invoice_order_list\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_pending_buyer_invoice_order_list?module=94&type=1)\r\n\r\n**Query（必填）**：`page_size`（1–100）\r\n\r\n**Query（可选）**：`cursor`\r\n\r\n**区域**：PH、BR 本地卖家\r\n\r\n---\r\n\r\n## 12. get_buyer_invoice_info\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_buyer_invoice_info?module=94&type=1)\r\n\r\n**Body（必填）**：`queries[]`（含 `order_sn`）\r\n\r\n**区域**：VN、TH、PH 本地卖家\r\n\r\n---\r\n\r\n## 13. upload_invoice_doc\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.upload_invoice_doc?module=94&type=1)\r\n\r\n**说明**：官方为 **multipart/form-data**（`order_sn`、`file_type`、`file`）。若 LinkFox 网关 `body` 仅支持 JSON 字符串，可能无法直接上传二进制；需确认网关能力或使用专用上传链路。\r\n\r\n**区域**：PH、BR\r\n\r\n---\r\n\r\n## 14. download_invoice_doc\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.download_invoice_doc?module=94&type=1)\r\n\r\n**Query（必填）**：`order_sn`\r\n\r\n**区域**：PH、BR\r\n\r\n---\r\n\r\n## 15. handle_prescription_check\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.handle_prescription_check?module=94&type=1)\r\n\r\n**Body（必填）**：`package_number`、`operation`（`APPROVE`|`REJECT`）\r\n\r\n**Body（可选）**：`order_sn`、`reject_reason`、`is_approved`、`reject_reason_code`、`items`、`pharmacist_name`、`free_text`\r\n\r\n**区域**：ID、PH 白名单卖家\r\n\r\n---\r\n\r\n## 16. get_warehouse_filter_config\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_warehouse_filter_config?module=94&type=1)\r\n\r\n无额外业务参数（仅店铺公共 query）。多仓店铺返回仓库过滤配置。\r\n\r\n---\r\n\r\n## 17. get_booking_list\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_booking_list?module=94&type=1)\r\n\r\n**Query（必填）**：`time_range_field`、`time_from`、`time_to`、`page_size`\r\n\r\n**Query（可选）**：`cursor`、`booking_status`（`READY_TO_SHIP`/`PROCESSED`/`SHIPPED`/`CANCELLED`/`MATCHED`）\r\n\r\n---\r\n\r\n## 18. get_booking_detail\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_booking_detail?module=94&type=1)\r\n\r\n**Query（必填）**：`booking_sn_list`（逗号分隔，1–50 个）\r\n\r\n**Query（可选）**：`response_optional_fields`\r\n\r\n---\r\n\r\n## 19. generate_fbs_invoices\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.generate_fbs_invoices?module=94&type=1)\r\n\r\n**Body（必填）**：`batch_download`（`start`/`end` YYYYMMDD、`document_type`、`file_type`；可选 `document_status`）\r\n\r\n**区域**：BR FBS\r\n\r\n---\r\n\r\n## 20. get_fbs_invoices_result\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_fbs_invoices_result?module=94&type=1)\r\n\r\n**Body（必填）**：`request_id_list.request_id`（int 数组）\r\n\r\n---\r\n\r\n## 21. download_fbs_invoices\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.download_fbs_invoices?module=94&type=1)\r\n\r\n**Body（必填）**：`request_id_list.request_id`（int 数组）\r\n\r\n**说明**：需先 `generate_fbs_invoices` → 本接口轮询结果 → 下载；链接 30 分钟过期。\r\n\r\n---\r\n\r\n## 22. get_estimiate_cancel_value\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_estimiate_cancel_value?module=94&type=1)\r\n\r\n> 官方 API 名拼写为 **estimiate**（非 estimate）。\r\n\r\n**Body（必填）**：`order_sn`、`partial_cancel_item_list[]`（`item_id`、`model_id`、`model_quantity`；可选 `order_item_id`、`promotion_group_id`）\r\n\r\n---\r\n\r\n## 网关错误码\r\n\r\n| errcode | 含义 | 建议 |\r\n|---------|------|------|\r\n| 1002 | 参数/未登录 | 检查 shopId 与 API Key |\r\n| 1003 | 代理/网络异常 | 重试 |\r\n| 1004 | 无授权记录 | auth skill |\r\n| 1005 | path 未白名单 | 确认 `api/v2/order/...` |\r\n\r\n紫鸟代理 HTTP：`400` 路径错误、`403` IP 白名单、`408` 超时、`5xx` 上游透传。\r\n\r\n---\r\n\r\n## curl 示例\r\n\r\n```bash\r\nexport KEY=$LINKFOXAGENT_API_KEY\r\nBASE=https://tool-gateway.linkfox.com\r\n\r\n# 订单列表\r\ncurl -X POST $BASE/shopee/developerProxy -H \"Authorization: $KEY\" \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\r\n    \"path\": \"api/v2/order/get_order_list\",\r\n    \"method\": \"GET\",\r\n    \"accessToken\": \"xxx\",\r\n    \"shopId\": \"67890\",\r\n    \"queryString\": \"time_range_field=create_time&time_from=1607235072&time_to=1608271872&page_size=20\"\r\n  }'\r\n\r\n# 取消订单\r\ncurl -X POST $BASE/shopee/developerProxy -H \"Authorization: $KEY\" \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\r\n    \"path\": \"api/v2/order/cancel_order\",\r\n    \"method\": \"POST\",\r\n    \"accessToken\": \"xxx\",\r\n    \"shopId\": \"67890\",\r\n    \"body\": \"{\\\"order_sn\\\":\\\"201020SQQ5K2EP\\\",\\\"cancel_reason\\\":\\\"CUSTOMER_REQUEST\\\"}\"\r\n  }'\r\n```\r\n\r\n---\r\n\r\n## Feedback API\r\n\r\n```bash\r\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\"skillName\":\"linkfox-shopee-store-orders\",\"sentiment\":\"POSITIVE\",\r\n       \"category\":\"OTHER\",\"content\":\"订单接口正常\"}'\r\n```\n\nFile v1.0.3:skill-card.md\n\n## Description: <br>\nHelps agents query and manage Shopee store orders through LinkFox wrappers for the Shopee Open Platform Order module, including order lists, details, shipment/package views, cancellations, notes, split/unsplit actions, booking, invoices, and related FBS 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 agent workflows use this skill to inspect Shopee order state, retrieve order and package details, and perform supported order-management actions after store authorization is available. <br>\n\n### Deployment Geography for Use: <br>\nGlobal, subject to Shopee account, marketplace, and endpoint-specific regional eligibility for invoice, FBS, and prescription-check APIs. <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can perform high-impact Shopee order mutations such as cancellation, split/unsplit, buyer-cancellation handling, prescription-check handling, and note updates. <br>\nMitigation: Require explicit confirmation of shop ID, order or package identifier, target API, and operation before running any mutating script. <br>\nRisk: Order responses may contain sensitive buyer, recipient, item, shipment, or invoice data and are saved to workspace files. <br>\nMitigation: Use a controlled workspace, review saved LinkFox response files, restrict access to generated data, and avoid inline full-response output for sensitive data. <br>\nRisk: Some APIs are region or eligibility restricted, including invoice, FBS, and prescription-check functions. <br>\nMitigation: Check the referenced API documentation and store eligibility before invoking region-limited endpoints. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/linkfox-ai/skills/linkfox-shopee-store-orders) <br>\n- [Local API parameter reference](references/api.md) <br>\n- [Shopee Open Platform Order module](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Shell commands, API calls, JSON, Files, Guidance] <br>\n**Output Format:** [JSON responses saved to workspace files, with stdout containing either full JSON or a concise summary depending on response size] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Requires LinkFox API credentials and an authorized Shopee store; large responses are summarized unless inline output is requested.] <br>\n\n## Skill Version(s): <br>\n1.0.3 (source: server release metadata) <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: 31 files, 32457 bytes\n\nFiles: references/api.md (14732b), scripts/_order_api_runner.py (5540b), scripts/_order_endpoints.py (7445b), scripts/_shopee_orders_common.py (11726b), scripts/cancel_order.py (685b), scripts/check_auth_dependency.py (3979b), scripts/download_fbs_invoices.py (739b), scripts/download_invoice_doc.py (733b), scripts/generate_fbs_invoices.py (739b), scripts/get_booking_detail.py (721b), scripts/get_booking_list.py (709b), scripts/get_buyer_invoice_info.py (745b), scripts/get_estimiate_cancel_value.py (769b), scripts/get_fbs_invoices_result.py (751b), scripts/get_order_detail.py (709b), scripts/get_order_list.py (697b), scripts/get_package_detail.py (721b), scripts/get_pending_buyer_invoice_order_list.py (829b), scripts/get_shipment_list.py (715b), scripts/get_warehouse_filter_config.py (775b), scripts/handle_buyer_cancellation.py (763b), scripts/handle_prescription_check.py (763b), scripts/order_api.py (1388b), scripts/search_package_list.py (727b), scripts/set_note.py (661b), scripts/split_order.py (679b), scripts/unsplit_order.py (691b), scripts/upload_invoice_doc.py (721b), skill-card.md (2889b), SKILL.md (7790b), _meta.json (146b)\n\nFile v1.0.2:SKILL.md\n\n---\r\nname: linkfox-shopee-store-orders\r\ndescription: Shopee（虾皮）店铺订单（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Order 模块全部 22 个接口：get_order_list、get_order_detail、get_shipment_list、search_package_list、cancel_order、ship 相关 booking/invoice/FBS 等。当用户提到 Shopee 订单、虾皮订单列表、订单详情、包裹、拆单、取消订单、买家取消、订单备注、booking、FBS 发票、order_sn、READY_TO_SHIP、Shopee order processing 时触发。即使未明确提及\"订单\"，只要涉及已授权 Shopee 店铺的订单查询或订单处理，也应触发。\r\n---\r\n\r\n# Shopee 店铺 Orders\r\n\r\nShopee Open Platform **Order 模块**（22 个 API）。**依赖 `linkfox-shopee-store-auth`**：先取 `accessToken`，再经 **`POST /shopee/developerProxy`** 转发（`path` 须 `api/v2/order/...`）。\r\n\r\n## 调用方式\r\n\r\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\r\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\r\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\r\n\r\n**输出策略（脚本默认行为）**：\r\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\r\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\r\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\r\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\r\n\r\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\r\n\r\n## 官方参考\r\n\r\nOrder 模块索引：[Shopee Open Platform — Order](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1)\r\n\r\n---\r\n\r\n## Prerequisites（必须先读）\r\n\r\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`** 并授权店铺。\r\n2. **不要**在本 skill 内实现授权/令牌逻辑。\r\n\r\n---\r\n\r\n## Core Concepts\r\n\r\n- **转发链路**：`storeTokens` → `developerProxy` → 紫鸟 `shopee-proxy` → Shopee API（`partner_id`/`sign` 由代理自动处理）\r\n- **列表 → 详情**：`get_order_list` 得 `order_sn` → `get_order_detail` 拉全量字段（≤50 个/次）\r\n- **包裹流**：`search_package_list` / `get_package_detail` / `get_shipment_list` 用于发货前包裹视图\r\n- **写操作**：`split_order`、`cancel_order`、`set_note` 等为 **POST JSON body**\r\n- **时间窗**：`get_order_list` / `get_booking_list` 的 `time_from`/`time_to` 最大 **15 天**\r\n\r\n## 可用脚本（Order 模块 22 个 API）\r\n\r\n| 脚本 | API | Method |\r\n|------|-----|--------|\r\n| `get_order_list.py` | get_order_list | GET |\r\n| `get_order_detail.py` | get_order_detail | GET |\r\n| `get_shipment_list.py` | get_shipment_list | GET |\r\n| `search_package_list.py` | search_package_list | POST |\r\n| `get_package_detail.py` | get_package_detail | GET |\r\n| `split_order.py` | split_order | POST |\r\n| `unsplit_order.py` | unsplit_order | POST |\r\n| `cancel_order.py` | cancel_order | POST |\r\n| `handle_buyer_cancellation.py` | handle_buyer_cancellation | POST |\r\n| `set_note.py` | set_note | POST |\r\n| `get_pending_buyer_invoice_order_list.py` | get_pending_buyer_invoice_order_list | GET |\r\n| `get_buyer_invoice_info.py` | get_buyer_invoice_info | POST |\r\n| `upload_invoice_doc.py` | upload_invoice_doc | POST |\r\n| `download_invoice_doc.py` | download_invoice_doc | GET |\r\n| `handle_prescription_check.py` | handle_prescription_check | POST |\r\n| `get_warehouse_filter_config.py` | get_warehouse_filter_config | GET |\r\n| `get_booking_list.py` | get_booking_list | GET |\r\n| `get_booking_detail.py` | get_booking_detail | GET |\r\n| `generate_fbs_invoices.py` | generate_fbs_invoices | POST |\r\n| `get_fbs_invoices_result.py` | get_fbs_invoices_result | POST |\r\n| `download_fbs_invoices.py` | download_fbs_invoices | POST |\r\n| `get_estimiate_cancel_value.py` | get_estimiate_cancel_value | POST |\r\n| `order_api.py` | 通用入口（JSON 含 `api` 字段） | — |\r\n\r\n共享：`_shopee_orders_common.py`、`_order_endpoints.py`、`_order_api_runner.py`。入参详见 `references/api.md`。\r\n\r\n## Usage Scenarios\r\n\r\n### 1. 查待发货订单\r\n1. auth skill 定位 `shopId`\r\n2. `get_order_list.py`：`order_status=READY_TO_SHIP`，`time_range_field=update_time`，15 天内时间戳\r\n3. `get_order_detail.py`：传入 `order_sn_list`\r\n\r\n### 2. 包裹维度处理\r\n1. `search_package_list.py`：传 `pagination.page_size` 及可选 `filter`/`sort`（或整体 `body`）\r\n2. `get_package_detail.py`：`package_number_list`\r\n3. 发货物流见 Logistics 模块（非本 skill）\r\n\r\n### 3. 取消 / 备注 / 拆单\r\n- 取消：`cancel_order.py`（`order_sn` + `cancel_reason`）\r\n- 买家取消申请：`handle_buyer_cancellation.py`（`ACCEPT`/`REJECT`）\r\n- 备注：`set_note.py`\r\n- 拆单/合单：`split_order.py` / `unsplit_order.py`\r\n\r\n### 4. 选店（高频）\r\n\r\n| 用户上下文 | Agent 动作 |\r\n|---|---|\r\n| 只授权 1 家 | 直接用 `shopId` |\r\n| 多家 + 店名 | auth skill `authorized_stores.py` 澄清 |\r\n| 已给 order_sn | 直接详情/写操作脚本 |\r\n\r\n## 调用原则\r\n\r\n- 先看 **`developerProxy.httpStatus`**，再读 `*Response` 解析字段\r\n- GET：业务参数作为脚本 JSON 顶层字段（runner 拼 `queryString`）\r\n- POST：传 `body` 对象，或按 api.md 传顶层 body 字段\r\n- `upload_invoice_doc` 官方为 **multipart**；若网关不支持，需在文档中说明限制\r\n- 分页：`get_order_list` 用 `cursor`/`next_cursor`；`search_package_list` 用 `pagination.cursor`\r\n\r\n## 常见问题\r\n\r\n### 1005 path 白名单\r\n\r\n确认 path 为 `api/v2/order/...`。\r\n\r\n### 区域限制\r\n\r\n发票类 API 限 PH/BR；`get_buyer_invoice_info` 限 VN/TH/PH；FBS 发票限 BR。见 `references/api.md`。\r\n\r\n### token 过期\r\n\r\n回到 **`linkfox-shopee-store-auth`** 重新授权。\r\n\r\n## Not Applicable\r\n\r\n- 店铺授权 → `linkfox-shopee-store-auth`\r\n- 商户信息 → `linkfox-shopee-store-merchant`\r\n- 店铺信息与设置 → `linkfox-shopee-store-shop`\r\n- 商品 listing → `linkfox-shopee-store-product`\r\n- 账户健康 Account Health → `linkfox-shopee-store-account-health`\r\n- 跨境全球商品 → `linkfox-shopee-store-global-product`\r\n- 物流发货 → `linkfox-shopee-store-logistics`\r\n- 头程 FirstMile → `linkfox-shopee-store-first-mile`\r\n- 退货退款 → `linkfox-shopee-store-returns`\r\n- 支付结算 → `linkfox-shopee-store-payment`\r\n- 选品 → `linkfox-youying-shopee-product-search`\r\n\r\n**Feedback:**\r\n\r\nAuto-detect and report feedback via the Feedback API when any of the following apply:\r\n1. The functionality or purpose described in this skill does not match actual behavior\r\n2. The skill's results do not match the user's intent\r\n3. The user expresses dissatisfaction or praise about this skill\r\n4. Anything you believe could be improved\r\n\r\nCall the feedback API as specified in `references/api.md`. Do not interrupt the user's flow.\r\n\r\n\r\n---\r\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-orders\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1783337528967\n}\n\nFile v1.0.2:references/api.md\n\n# linkfox-shopee-store-orders — 参数与字段参考\r\n\r\nShopee **Order 模块**全部 22 个 API，经 **`POST /shopee/developerProxy`** 转发。\r\n\r\n授权见 **`linkfox-shopee-store-auth`**。官方文档：[Order module](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1)\r\n\r\n## 通用约定\r\n\r\n- **Base URL**：`${LINKFOX_TOOL_GATEWAY}`\r\n- **Method**：POST（网关），上游 Method 见各接口\r\n- **Auth**：Header `Authorization: <api_key>`（从 `LINKFOX_AGENT_API_KEY` 或 `LINKFOXAGENT_API_KEY` 读取）\r\n- **流程**：`POST /shopee/storeTokens` → `POST /shopee/developerProxy`\r\n- **path**：须 `api/v2/order/...`（不含域名）\r\n- **紫鸟代理**：自动追加 `partner_id`、`timestamp`、`sign`；`access_token`/`shop_id` 由 `developerProxy` 写入\r\n\r\n**developerProxy Request**：\r\n| 参数 | 必填 | 说明 |\r\n|------|------|------|\r\n| `path` | 是 | 如 `api/v2/order/get_order_list` |\r\n| `method` | 是 | `GET` / `POST` |\r\n| `accessToken` | 是 | 店铺 token |\r\n| `shopId` / `merchantId` | 二选一 | 转发为 `shop_id` / `merchant_id` |\r\n| `queryString` | GET 时 | 业务 query，不含 `?` |\r\n| `body` | POST 时 | JSON 字符串 |\r\n| `contentType` | 否 | 默认 `application/json` |\r\n\r\n**developerProxy Response**：\r\n```json\r\n{\"httpStatus\": 200, \"contentType\": \"application/json\", \"body\": \"{\\\"error\\\":\\\"\\\",\\\"response\\\":{...}}\"}\r\n```\r\n\r\n脚本在 `httpStatus==200` 时解析 `body` 为 `{responseKey}` / `{responseKey}Response`。\r\n\r\n---\r\n\r\n## Order 模块总览\r\n\r\n| # | API | Method | path | 脚本 | 官方文档 |\r\n|---|-----|--------|------|------|----------|\r\n| 1 | get_order_list | GET | `api/v2/order/get_order_list` | `get_order_list.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1) |\r\n| 2 | get_order_detail | GET | `api/v2/order/get_order_detail` | `get_order_detail.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_order_detail?module=94&type=1) |\r\n| 3 | get_shipment_list | GET | `api/v2/order/get_shipment_list` | `get_shipment_list.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_shipment_list?module=94&type=1) |\r\n| 4 | search_package_list | POST | `api/v2/order/search_package_list` | `search_package_list.py` | [doc](https://open.shopee.com/documents/v2/v2.order.search_package_list?module=94&type=1) |\r\n| 5 | get_package_detail | GET | `api/v2/order/get_package_detail` | `get_package_detail.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_package_detail?module=94&type=1) |\r\n| 6 | split_order | POST | `api/v2/order/split_order` | `split_order.py` | [doc](https://open.shopee.com/documents/v2/v2.order.split_order?module=94&type=1) |\r\n| 7 | unsplit_order | POST | `api/v2/order/unsplit_order` | `unsplit_order.py` | [doc](https://open.shopee.com/documents/v2/v2.order.unsplit_order?module=94&type=1) |\r\n| 8 | cancel_order | POST | `api/v2/order/cancel_order` | `cancel_order.py` | [doc](https://open.shopee.com/documents/v2/v2.order.cancel_order?module=94&type=1) |\r\n| 9 | handle_buyer_cancellation | POST | `api/v2/order/handle_buyer_cancellation` | `handle_buyer_cancellation.py` | [doc](https://open.shopee.com/documents/v2/v2.order.handle_buyer_cancellation?module=94&type=1) |\r\n| 10 | set_note | POST | `api/v2/order/set_note` | `set_note.py` | [doc](https://open.shopee.com/documents/v2/v2.order.set_note?module=94&type=1) |\r\n| 11 | get_pending_buyer_invoice_order_list | GET | `api/v2/order/get_pending_buyer_invoice_order_list` | `get_pending_buyer_invoice_order_list.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_pending_buyer_invoice_order_list?module=94&type=1) |\r\n| 12 | get_buyer_invoice_info | POST | `api/v2/order/get_buyer_invoice_info` | `get_buyer_invoice_info.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_buyer_invoice_info?module=94&type=1) |\r\n| 13 | upload_invoice_doc | POST | `api/v2/order/upload_invoice_doc` | `upload_invoice_doc.py` | [doc](https://open.shopee.com/documents/v2/v2.order.upload_invoice_doc?module=94&type=1) |\r\n| 14 | download_invoice_doc | GET | `api/v2/order/download_invoice_doc` | `download_invoice_doc.py` | [doc](https://open.shopee.com/documents/v2/v2.order.download_invoice_doc?module=94&type=1) |\r\n| 15 | handle_prescription_check | POST | `api/v2/order/handle_prescription_check` | `handle_prescription_check.py` | [doc](https://open.shopee.com/documents/v2/v2.order.handle_prescription_check?module=94&type=1) |\r\n| 16 | get_warehouse_filter_config | GET | `api/v2/order/get_warehouse_filter_config` | `get_warehouse_filter_config.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_warehouse_filter_config?module=94&type=1) |\r\n| 17 | get_booking_list | GET | `api/v2/order/get_booking_list` | `get_booking_list.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_booking_list?module=94&type=1) |\r\n| 18 | get_booking_detail | GET | `api/v2/order/get_booking_detail` | `get_booking_detail.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_booking_detail?module=94&type=1) |\r\n| 19 | generate_fbs_invoices | POST | `api/v2/order/generate_fbs_invoices` | `generate_fbs_invoices.py` | [doc](https://open.shopee.com/documents/v2/v2.order.generate_fbs_invoices?module=94&type=1) |\r\n| 20 | get_fbs_invoices_result | POST | `api/v2/order/get_fbs_invoices_result` | `get_fbs_invoices_result.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_fbs_invoices_result?module=94&type=1) |\r\n| 21 | download_fbs_invoices | POST | `api/v2/order/download_fbs_invoices` | `download_fbs_invoices.py` | [doc](https://open.shopee.com/documents/v2/v2.order.download_fbs_invoices?module=94&type=1) |\r\n| 22 | get_estimiate_cancel_value | POST | `api/v2/order/get_estimiate_cancel_value` | `get_estimiate_cancel_value.py` | [doc](https://open.shopee.com/documents/v2/v2.order.get_estimiate_cancel_value?module=94&type=1) |\r\n\r\n通用入口：`order_api.py`（JSON 含 `\"api\": \"<上表 API 名>\"`）。\r\n\r\n---\r\n\r\n## 1. get_order_list\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1)\r\n\r\n**Query（必填）**：`time_range_field`（`create_time`|`update_time`）、`time_from`、`time_to`（Unix 秒，跨度 ≤15 天）、`page_size`（1–100）\r\n\r\n**Query（可选）**：`cursor`、`order_status`（`UNPAID`/`READY_TO_SHIP`/`PROCESSED`/`SHIPPED`/`COMPLETED`/`IN_CANCEL`/`CANCELLED`/`INVOICE_PENDING`）、`response_optional_fields`、`request_order_status_pending`、`logistics_channel_id`（仅 BR）\r\n\r\n**Response**：`more`、`next_cursor`、`order_list[]`（含 `order_sn`）\r\n\r\n---\r\n\r\n## 2. get_order_detail\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_order_detail?module=94&type=1)\r\n\r\n**Query（必填）**：`order_sn_list`（逗号分隔或数组，1–50 个）\r\n\r\n**Query（可选）**：`response_optional_fields`、`request_order_status_pending`\r\n\r\n**Response**：`order_list[]`（`order_sn`、`order_status`、`total_amount`、`item_list`、`recipient_address` 等）\r\n\r\n---\r\n\r\n## 3. get_shipment_list\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_shipment_list?module=94&type=1)\r\n\r\n**Query（必填）**：`page_size`（1–100）\r\n\r\n**Query（可选）**：`cursor`\r\n\r\n**说明**：返回可开始发货流程的 `READY_TO_SHIP` 订单/包裹。\r\n\r\n---\r\n\r\n## 4. search_package_list\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.search_package_list?module=94&type=1)\r\n\r\n**Body（必填）**：`pagination.page_size`（1–100）\r\n\r\n**Body（可选）**：\r\n- `filter`：`package_status`、`product_location_ids`、`logistics_channel_ids`、`fulfillment_type`、`invoice_pending`、`sorting_group`（TW）、`order_type`、`is_pre_order`、`shipping_priority`\r\n- `pagination.cursor`\r\n- `sort`：`sort_type`（1=ShipByDate/2=CreateDate/3=ConfirmedDate）、`ascending`\r\n\r\n**示例**：\r\n```json\r\n{\r\n  \"shopId\": \"67890\",\r\n  \"filter\": {\"package_status\": 2, \"fulfillment_type\": 2},\r\n  \"pagination\": {\"page_size\": 20, \"cursor\": \"\"},\r\n  \"sort\": {\"sort_type\": 1, \"ascending\": false}\r\n}\r\n```\r\n\r\n---\r\n\r\n## 5. get_package_detail\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_package_detail?module=94&type=1)\r\n\r\n**Query（必填）**：`package_number_list`（逗号分隔，1–50 个）\r\n\r\n---\r\n\r\n## 6. split_order\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.split_order?module=94&type=1)\r\n\r\n**Body（必填）**：`order_sn`、`package_list[]`（含 `item_list[]`：`item_id`、`model_id`；可选 `order_item_id`、`promotion_group_id`、`model_quantity`）\r\n\r\n---\r\n\r\n## 7. unsplit_order\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.unsplit_order?module=94&type=1)\r\n\r\n**Body（必填）**：`order_sn`（仅 `READY_TO_SHIP` 且未发货的已拆分订单）\r\n\r\n---\r\n\r\n## 8. cancel_order\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.cancel_order?module=94&type=1)\r\n\r\n**Body（必填）**：`order_sn`、`cancel_reason`\r\n\r\n**Body（可选）**：`item_list`、`partial_cancel_item_list`（`item_id`、`model_id`、`model_quantity` 等）\r\n\r\n**cancel_reason**：`OUT_OF_STOCK`、`CUSTOMER_REQUEST`、`UNDELIVERABLE_AREA`（TW/MY）、`COD_NOT_SUPPORTED`\r\n\r\n---\r\n\r\n## 9. handle_buyer_cancellation\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.handle_buyer_cancellation?module=94&type=1)\r\n\r\n**Body（必填）**：`order_sn`、`operation`（`ACCEPT`|`REJECT`）\r\n\r\n---\r\n\r\n## 10. set_note\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.set_note?module=94&type=1)\r\n\r\n**Body（必填）**：`order_sn`、`note`\r\n\r\n---\r\n\r\n## 11. get_pending_buyer_invoice_order_list\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_pending_buyer_invoice_order_list?module=94&type=1)\r\n\r\n**Query（必填）**：`page_size`（1–100）\r\n\r\n**Query（可选）**：`cursor`\r\n\r\n**区域**：PH、BR 本地卖家\r\n\r\n---\r\n\r\n## 12. get_buyer_invoice_info\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_buyer_invoice_info?module=94&type=1)\r\n\r\n**Body（必填）**：`queries[]`（含 `order_sn`）\r\n\r\n**区域**：VN、TH、PH 本地卖家\r\n\r\n---\r\n\r\n## 13. upload_invoice_doc\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.upload_invoice_doc?module=94&type=1)\r\n\r\n**说明**：官方为 **multipart/form-data**（`order_sn`、`file_type`、`file`）。若 LinkFox 网关 `body` 仅支持 JSON 字符串，可能无法直接上传二进制；需确认网关能力或使用专用上传链路。\r\n\r\n**区域**：PH、BR\r\n\r\n---\r\n\r\n## 14. download_invoice_doc\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.download_invoice_doc?module=94&type=1)\r\n\r\n**Query（必填）**：`order_sn`\r\n\r\n**区域**：PH、BR\r\n\r\n---\r\n\r\n## 15. handle_prescription_check\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.handle_prescription_check?module=94&type=1)\r\n\r\n**Body（必填）**：`package_number`、`operation`（`APPROVE`|`REJECT`）\r\n\r\n**Body（可选）**：`order_sn`、`reject_reason`、`is_approved`、`reject_reason_code`、`items`、`pharmacist_name`、`free_text`\r\n\r\n**区域**：ID、PH 白名单卖家\r\n\r\n---\r\n\r\n## 16. get_warehouse_filter_config\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_warehouse_filter_config?module=94&type=1)\r\n\r\n无额外业务参数（仅店铺公共 query）。多仓店铺返回仓库过滤配置。\r\n\r\n---\r\n\r\n## 17. get_booking_list\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_booking_list?module=94&type=1)\r\n\r\n**Query（必填）**：`time_range_field`、`time_from`、`time_to`、`page_size`\r\n\r\n**Query（可选）**：`cursor`、`booking_status`（`READY_TO_SHIP`/`PROCESSED`/`SHIPPED`/`CANCELLED`/`MATCHED`）\r\n\r\n---\r\n\r\n## 18. get_booking_detail\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_booking_detail?module=94&type=1)\r\n\r\n**Query（必填）**：`booking_sn_list`（逗号分隔，1–50 个）\r\n\r\n**Query（可选）**：`response_optional_fields`\r\n\r\n---\r\n\r\n## 19. generate_fbs_invoices\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.generate_fbs_invoices?module=94&type=1)\r\n\r\n**Body（必填）**：`batch_download`（`start`/`end` YYYYMMDD、`document_type`、`file_type`；可选 `document_status`）\r\n\r\n**区域**：BR FBS\r\n\r\n---\r\n\r\n## 20. get_fbs_invoices_result\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_fbs_invoices_result?module=94&type=1)\r\n\r\n**Body（必填）**：`request_id_list.request_id`（int 数组）\r\n\r\n---\r\n\r\n## 21. download_fbs_invoices\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.download_fbs_invoices?module=94&type=1)\r\n\r\n**Body（必填）**：`request_id_list.request_id`（int 数组）\r\n\r\n**说明**：需先 `generate_fbs_invoices` → 本接口轮询结果 → 下载；链接 30 分钟过期。\r\n\r\n---\r\n\r\n## 22. get_estimiate_cancel_value\r\n\r\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_estimiate_cancel_value?module=94&type=1)\r\n\r\n> 官方 API 名拼写为 **estimiate**（非 estimate）。\r\n\r\n**Body（必填）**：`order_sn`、`partial_cancel_item_list[]`（`item_id`、`model_id`、`model_quantity`；可选 `order_item_id`、`promotion_group_id`）\r\n\r\n---\r\n\r\n## 网关错误码\r\n\r\n| errcode | 含义 | 建议 |\r\n|---------|------|------|\r\n| 1002 | 参数/未登录 | 检查 shopId 与 API Key |\r\n| 1003 | 代理/网络异常 | 重试 |\r\n| 1004 | 无授权记录 | auth skill |\r\n| 1005 | path 未白名单 | 确认 `api/v2/order/...` |\r\n\r\n紫鸟代理 HTTP：`400` 路径错误、`403` IP 白名单、`408` 超时、`5xx` 上游透传。\r\n\r\n---\r\n\r\n## curl 示例\r\n\r\n```bash\r\nexport KEY=$LINKFOXAGENT_API_KEY\r\nBASE=https://tool-gateway.linkfox.com\r\n\r\n# 订单列表\r\ncurl -X POST $BASE/shopee/developerProxy -H \"Authorization: $KEY\" \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\r\n    \"path\": \"api/v2/order/get_order_list\",\r\n    \"method\": \"GET\",\r\n    \"accessToken\": \"xxx\",\r\n    \"shopId\": \"67890\",\r\n    \"queryString\": \"time_range_field=create_time&time_from=1607235072&time_to=1608271872&page_size=20\"\r\n  }'\r\n\r\n# 取消订单\r\ncurl -X POST $BASE/shopee/developerProxy -H \"Authorization: $KEY\" \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\r\n    \"path\": \"api/v2/order/cancel_order\",\r\n    \"method\": \"POST\",\r\n    \"accessToken\": \"xxx\",\r\n    \"shopId\": \"67890\",\r\n    \"body\": \"{\\\"order_sn\\\":\\\"201020SQQ5K2EP\\\",\\\"cancel_reason\\\":\\\"CUSTOMER_REQUEST\\\"}\"\r\n  }'\r\n```\r\n\r\n---\r\n\r\n## Feedback API\r\n\r\n```bash\r\ncurl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\"skillName\":\"linkfox-shopee-store-orders\",\"sentiment\":\"POSITIVE\",\r\n       \"category\":\"OTHER\",\"content\":\"订单接口正常\"}'\r\n```\n\nFile v1.0.2:skill-card.md\n\n## Description: <br>\nHelps agents query and manage authorized Shopee store orders through LinkFox scripts for the Shopee Open Platform Order module, including order lists, order details, packages, cancellations, notes, booking, invoice, and FBS invoice actions. <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 marketplace operators and agents use this skill to retrieve Shopee order data and perform order-management actions for authorized stores through LinkFox. It supports package lookup, cancellation handling, order notes, invoice workflows, booking, and FBS order operations. <br>\n\n### Deployment Geography for Use: <br>\nGlobal, with Shopee API feature availability varying by marketplace for invoice, FBS, and prescription endpoints. <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can modify live Shopee order state, including cancellations, notes, split or unsplit actions, and buyer cancellation handling. <br>\nMitigation: Use explicit order IDs and require user confirmation before any write action or cancellation-related script is run. <br>\nRisk: Full Shopee order responses are saved locally and may include customer, recipient, payment, invoice, or shipment details. <br>\nMitigation: Treat LinkFox output folders as sensitive, limit file sharing, and delete stored response files when they are no longer needed. <br>\nRisk: Automatic feedback reporting may disclose operational context or user sentiment outside the immediate task flow. <br>\nMitigation: Disable or avoid automatic feedback reporting unless the user has consented. <br>\n\n\n## Reference(s): <br>\n- [linkfox-shopee-store-orders API reference](references/api.md) <br>\n- [Shopee Open Platform Order module](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1) <br>\n- [ClawHub skill page](https://clawhub.ai/linkfox-ai/skills/linkfox-shopee-store-orders) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Shell commands, API calls, JSON, Files, Guidance] <br>\n**Output Format:** [Markdown guidance with Python command examples, JSON request parameters, stdout JSON or summaries, and saved JSON response files.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Full responses are saved to local LinkFox session data; stdout prints full JSON for small responses and summaries for larger responses unless inline output is requested.] <br>\n\n## Skill Version(s): <br>\n1.0.2 (source: server release metadata) <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.1: 30 files, 31002 bytes\n\nFiles: references/api.md (14732b), scripts/_order_api_runner.py (5540b), scripts/_order_endpoints.py (7445b), scripts/_shopee_orders_common.py (11726b), scripts/cancel_order.py (685b), scripts/check_auth_dependency.py (3979b), scripts/download_fbs_invoices.py (739b), scripts/download_invoice_doc.py (733b), scripts/generate_fbs_invoices.py (739b), scripts/get_booking_detail.py (721b), scripts/get_booking_list.py (709b), scripts/get_buyer_invoice_info.py (745b), scripts/get_estimiate_cancel_value.py (769b), scripts/get_fbs_invoices_result.py (751b), scripts/get_order_detail.py (709b), scripts/get_order_list.py (697b), scripts/get_package_detail.py (721b), scripts/get_pending_buyer_invoice_order_list.py (829b), scripts/get_shipment_list.py (715b), scripts/get_warehouse_filter_config.py (775b), scripts/handle_buyer_cancellation.py (763b), scripts/handle_prescription_check.py (763b), scripts/order_api.py (1388b), scripts/search_package_list.py (727b), scripts/set_note.py (661b), scripts/split_order.py (679b), scripts/unsplit_order.py (691b), scripts/upload_invoice_doc.py (721b), SKILL.md (7790b), _meta.json (146b)\n\nFile v1.0.1:SKILL.md\n\n---\r\nname: linkfox-shopee-store-orders\r\ndescription: Shopee（虾皮）店铺订单（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Order 模块全部 22 个接口：get_order_list、get_order_detail、get_shipment_list、search_package_list、cancel_order、ship 相关 booking/invoice/FBS 等。当用户提到 Shopee 订单、虾皮订单列表、订单详情、包裹、拆单、取消订单、买家取消、订单备注、booking、FBS 发票、order_sn、READY_TO_SHIP、Shopee order processing 时触发。即使未明确提及\"订单\"，只要涉及已授权 Shopee 店铺的订单查询或订单处理，也应触发。\r\n---\r\n\r\n# Shopee 店铺 Orders\r\n\r\nShopee Open Platform **Order 模块**（22 个 API）。**依赖 `linkfox-shopee-store-auth`**：先取 `accessToken`，再经 **`POST /shopee/developerProxy`** 转发（`path` 须 `api/v2/order/...`）。\r\n\r\n## 调用方式\r\n\r\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\r\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\r\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\r\n\r\n**输出策略（脚本默认行为）**：\r\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\r\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\r\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\r\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\r\n\r\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\r\n\r\n## 官方参考\r\n\r\nOrder 模块索引：[Shopee Open Platform — Order](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1)\r\n\r\n---\r\n\r\n## Prerequisites（必须先读）\r\n\r\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`** 并授权店铺。\r\n2. **不要**在本 skill 内实现授权/令牌逻辑。\r\n\r\n---\r\n\r\n## Core Concepts\r\n\r\n- **转发链路**：`storeTokens` → `developerProxy` → 紫鸟 `shopee-proxy` → Shopee API（`partner_id`/`sign` 由代理自动处理）\r\n- **列表 → 详情**：`get_order_list` 得 `order_sn` → `get_order_detail` 拉全量字段（≤50 个/次）\r\n- **包裹流**：`search_package_list` / `get_package_detail` / `get_shipment_list` 用于发货前包裹视图\r\n- **写操作**：`split_order`、`cancel_order`、`set_note` 等为 **POST JSON body**\r\n- **时间窗**：`get_order_list` / `get_booking_list` 的 `time_from`/`time_to` 最大 **15 天**\r\n\r\n## 可用脚本（Order 模块 22 个 API）\r\n\r\n| 脚本 | API | Method |\r\n|------|-----|--------|\r\n| `get_order_list.py` | get_order_list | GET |\r\n| `get_order_detail.py` | get_order_detail | GET |\r\n| `get_shipment_list.py` | get_shipment_list | GET |\r\n| `search_package_list.py` | search_package_list | POST |\r\n| `get_package_detail.py` | get_package_detail | GET |\r\n| `split_order.py` | split_order | POST |\r\n| `unsplit_order.py` | unsplit_order | POST |\r\n| `cancel_order.py` | cancel_order | POST |\r\n| `handle_buyer_cancellation.py` | handle_buyer_cancellation | POST |\r\n| `set_note.py` | set_note | POST |\r\n| `get_pending_buyer_invoice_order_list.py` | get_pending_buyer_invoice_order_list | GET |\r\n| `get_buyer_invoice_info.py` | get_buyer_invoice_info | POST |\r\n| `upload_invoice_doc.py` | upload_invoice_doc | POST |\r\n| `download_invoice_doc.py` | download_invoice_doc | GET |\r\n| `handle_prescription_check.py` | handle_prescription_check | POST |\r\n| `get_warehouse_filter_config.py` | get_warehouse_filter_config | GET |\r\n| `get_booking_list.py` | get_booking_list | GET |\r\n| `get_booking_detail.py` | get_booking_detail | GET |\r\n| `generate_fbs_invoices.py` | generate_fbs_invoices | POST |\r\n| `get_fbs_invoices_result.py` | get_fbs_invoices_result | POST |\r\n| `download_fbs_invoices.py` | download_fbs_invoices | POST |\r\n| `get_estimiate_cancel_value.py` | get_estimiate_cancel_value | POST |\r\n| `order_api.py` | 通用入口（JSON 含 `api` 字段） | — |\r\n\r\n共享：`_shopee_orders_common.py`、`_order_endpoints.py`、`_order_api_runner.py`。入参详见 `references/api.md`。\r\n\r\n## Usage Scenarios\r\n\r\n### 1. 查待发货订单\r\n1. auth skill 定位 `shopId`\r\n2. `get_order_list.py`：`order_status=READY_TO_SHIP`，`time_range_field=update_time`，15 天内时间戳\r\n3. `get_order_detail.py`：传入 `order_sn_list`\r\n\r\n### 2. 包裹维度处理\r\n1. `search_package_list.py`：传 `pagination.page_size` 及可选 `filter`/`sort`（或整体 `body`）\r\n2. `get_package_detail.py`：`package_number_list`\r\n3. 发货物流见 Logistics 模块（非本 skill）\r\n\r\n### 3. 取消 / 备注 / 拆单\r\n- 取消：`cancel_order.py`（`order_sn` + `cancel_reason`）\r\n- 买家取消申请：`handle_buyer_cancellation.py`（`ACCEPT`/`REJECT`）\r\n- 备注：`set_note.py`\r\n- 拆单/合单：`split_order.py` / `unsplit_order.py`\r\n\r\n### 4. 选店（高频）\r\n\r\n| 用户上下文 | Agent 动作 |\r\n|---|---|\r\n| 只授权 1 家 | 直接用 `shopId` |\r\n| 多家 + 店名 | auth skill `authorized_stores.py` 澄清 |\r\n| 已给 order_sn | 直接详情/写操作脚本 |\r\n\r\n## 调用原则\r\n\r\n- 先看 **`developerProxy.httpStatus`**，再读 `*Response` 解析字段\r\n- GET：业务参数作为脚本 JSON 顶层字段（runner 拼 `queryString`）\r\n- POST：传 `body` 对象，或按 api.md 传顶层 body 字段\r\n- `upload_invoice_doc` 官方为 **multipart**；若网关不支持，需在文档中说明限制\r\n- 分页：`get_order_list` 用 `cursor`/`next_cursor`；`search_package_list` 用 `pagination.cursor`\r\n\r\n## 常见问题\r\n\r\n### 1005 path 白名单\r\n\r\n确认 path 为 `api/v2/order/...`。\r\n\r\n### 区域限制\r\n\r\n发票类 API 限 PH/BR；`get_buyer_invoice_info` 限 VN/TH/PH；FBS 发票限 BR。见 `references/api.md`。\r\n\r\n### token 过期\r\n\r\n回到 **`linkfox-shopee-store-auth`** 重新授权。\r\n\r\n## Not Applicable\r\n\r\n- 店铺授权 → `linkfox-shopee-store-auth`\r\n- 商户信息 → `linkfox-shopee-store-merchant`\r\n- 店铺信息与设置 → `linkfox-shopee-store-shop`\r\n- 商品 listing → `linkfox-shopee-store-product`\r\n- 账户健康 Account Health → `linkfox-shopee-store-account-health`\r\n- 跨境全球商品 → `linkfox-shopee-store-global-product`\r\n- 物流发货 → `linkfox-shopee-store-logistics`\r\n- 头程 FirstMile → `linkfox-shopee-store-first-mile`\r\n- 退货退款 → `linkfox-shopee-store-returns`\r\n- 支付结算 → `linkfox-shopee-store-payment`\r\n- 选品 → `linkfox-youying-shopee-product-search`\r\n\r\n**Feedback:**\r\n\r\nAuto-detect and report feedback via the Feedback API when any of the following apply:\r\n1. The functionality or purpose described in this skill does not match actual behavior\r\n2. The skill's results do not match the user's intent\r\n3. The user expresses dissatisfaction or praise about this skill\r\n4. Anything you believe could be improved\r\n\r\nCall the feedback API as specified in `references/api.md`. Do not interrupt the user's flow.\r\n\r\n\r\n---\r\n*For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).*\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-orders\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1783067483608\n}\n\nFile v1.0.1:references/api.md\n\n# linkfox-shopee-store-orders — 参数与字段参考\r\n\r\nShopee **Order 模块**全部 22 个 API，经 **`POST /shopee/developerProxy`** 转发。\r\n\r\n授权见 **`linkfox-shopee-store-auth`**。官方文档：[Order module](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1)\r\n\r\n## 通用约定\r\n\r\n- **Base URL**：`${LINKFOX_TOOL_GATEWAY}`\r\n- **Method**：POST（网关），上游 Method 见各接口\r\n- **Auth**：Header `Authorization: <api_key>`（从 `LINKFOX_AGENT_API_KEY` 或 `LINKFOXAGENT_API_KEY` 读取）\r\n- **流程**：`POST /shopee/storeTokens` → `POST /shopee/developerProxy`\r\n- **path**：须 `api/v2/order/...`（不含域名）\r\n- **紫鸟代理**：自动追加 `partner_id`、`timestamp`、`sign`；`access_token`/`shop_id` 由 `developerProxy` 写入\r\n\r\n**developerProxy \n\nArchive v1.0.0: 30 files, 30984 bytes\n\nFiles: references/api.md (14733b), scripts/_order_api_runner.py (5540b), scripts/_order_endpoints.py (7445b), scripts/_shopee_orders_common.py (11727b), scripts/cancel_order.py (685b), scripts/check_auth_dependency.py (3979b), scripts/download_fbs_invoices.py (739b), scripts/download_invoice_doc.py (733b), scripts/generate_fbs_invoices.py (739b), scripts/get_booking_detail.py (721b), scripts/get_booking_list.py (709b), scripts/get_buyer_invoice_info.py (745b), scripts/get_estimiate_cancel_value.py (769b), scripts/get_fbs_invoices_result.py (751b), scripts/get_order_detail.py (709b), scripts/get_order_list.py (697b), scripts/get_package_detail.py (721b), scripts/get_pending_buyer_invoice_order_list.py (829b), scripts/get_shipment_list.py (715b), scripts/get_warehouse_filter_config.py (775b), scripts/handle_buyer_cancellation.py (763b), scripts/handle_prescription_check.py (763b), scripts/order_api.py (1388b), scripts/search_package_list.py (727b), scripts/set_note.py (661b), scripts/split_order.py (679b), scripts/unsplit_order.py (691b), scripts/upload_invoice_doc.py (721b), SKILL.md (7790b), _meta.json (146b)","readmeExcerpt":"Skill: Shopee-店铺订单 Owner: linkfox-ai Summary: Shopee（虾皮）店铺订单（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Order 模块全部 22 个接口：get_order_list、get_order_detail、get_shipment_list、search_package_list、cancel_order、ship 相关 booking/invoice/FBS 等。当用户提到 Shopee 订单、虾皮订单列表、订单详情、包裹、拆单、取消订单、买家取消、订单备注、booking、FBS 发票、order_sn、READY_TO_SHIP、Shopee order processing 时触发。即使未明确提及\"订单\"，只要涉及已授权 Shopee 店铺的订单查询或订","codeSnippets":[],"executableExamples":[{"language":"text","snippet":"File v1.0.6:references/apis/cancel-order.md\n\n# cancel_order\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/cancel_order.py` |\n| Method / path | POST `api/v2/order/cancel_order` |\n| 官方文档 | [cancel_order](https://open.shopee.com/documents/v2/v2.order.cancel_order?module=94&type=1) |\n| 用途 | cancel_reason: OUT_OF_STOCK/CUSTOMER_REQUEST/UNDELIVERABLE_AREA/COD_NOT_SUPPORTED |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `order_sn` | — | 是 | 见 notes / 官方文档 |\n| `cancel_reason` | — | 是 | 见 notes / 官方文档 |\n| `item_list` | — | 否（POST body） | 见 notes / 官方文档 |\n| `partial_cancel_item_list` | — | 否（POST body） | 见 notes / 官方文档 |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：cancel_reason: OUT_OF_STOCK/CUSTOMER_REQUEST/UNDELIVERABLE_AREA/COD_NOT_SUPPORTED\n\n---\n\n## 调用示例"},{"language":"text","snippet":"---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`cancelOrder`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.cancel_order?module=94&type=1)\n\n**Body（必填）**：`order_sn`、`cancel_reason`\n\n**Body（可选）**：`item_list`、`partial_cancel_item_list`（`item_id`、`model_id`、`model_quantity` 等）\n\n**cancel_reason**：`OUT_OF_STOCK`、`CUSTOMER_REQUEST`、`UNDELIVERABLE_AREA`（TW/MY）、`COD_NOT_SUPPORTED`\n\n---\n\nFile v1.0.6:references/apis/download-fbs-invoices.md\n\n# download_fbs_invoices\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/download_fbs_invoices.py` |\n| Method / path | POST `api/v2/order/download_fbs_invoices` |\n| 官方文档 | [download_fbs_invoices](https://open.shopee.com/documents/v2/v2.order.download_fbs_invoices?module=94&type=1) |\n| 用途 | Download link expires in 30 minutes |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `request_id_list` | — | 否（POST body） | 见 notes / 官方文档 |\n| `request_id_list` | object | 否（可嵌在 body） | 嵌套对象；或整体传 `body` / `requestBody` |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Download link expires in 30 minutes\n\n---\n\n## 调用示例"},{"language":"text","snippet":"---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`downloadFbsInvoices`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.download_fbs_invoices?module=94&type=1)\n\n**Body（必填）**：`request_id_list.request_id`（int 数组）\n\n**说明**：需先 `generate_fbs_invoices` → 本接口轮询结果 → 下载；链接 30 分钟过期。\n\n---\n\nFile v1.0.6:references/apis/download-invoice-doc.md\n\n# download_invoice_doc\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/download_invoice_doc.py` |\n| Method / path | GET `api/v2/order/download_invoice_doc` |\n| 官方文档 | [download_invoice_doc](https://open.shopee.com/documents/v2/v2.order.download_invoice_doc?module=94&type=1) |\n| 用途 | PH/BR |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `order_sn` | — | **是** | Query 必填（见 notes / 官方文档） |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：PH/BR\n\n---\n\n## 调用示例"},{"language":"text","snippet":"---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`downloadInvoiceDoc`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.download_invoice_doc?module=94&type=1)\n\n**Query（必填）**：`order_sn`\n\n**区域**：PH、BR\n\n---\n\nFile v1.0.6:references/apis/generate-fbs-invoices.md\n\n# generate_fbs_invoices\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/generate_fbs_invoices.py` |\n| Method / path | POST `api/v2/order/generate_fbs_invoices` |\n| 官方文档 | [generate_fbs_invoices](https://open.shopee.com/documents/v2/v2.order.generate_fbs_invoices?module=94&type=1) |\n| 用途 | BR FBS; batch_download.start/end YYYYMMDD |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `batch_download` | — | 否（POST body） | 见 notes / 官方文档 |\n| `batch_download` | object | 否（可嵌在 body） | 嵌套对象；或整体传 `body` / `requestBody` |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：BR FBS; batch_download.start/end YYYYMMDD\n\n---\n\n## 调用示例"},{"language":"text","snippet":"---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`generateFbsInvoices`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.generate_fbs_invoices?module=94&type=1)\n\n**Body（必填）**：`batch_download`（`start`/`end` YYYYMMDD、`document_type`、`file_type`；可选 `document_status`）\n\n**区域**：BR FBS\n\n---\n\nFile v1.0.6:references/apis/get-booking-detail.md\n\n# get_booking_detail\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_booking_detail.py` |\n| Method / path | GET `api/v2/order/get_booking_detail` |\n| 官方文档 | [get_booking_detail](https://open.shopee.com/documents/v2/v2.order.get_booking_detail?module=94&type=1) |\n| 用途 | booking_sn_list: comma-separated, max 50 |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `booking_sn_list` | — | **是** | Query 必填（见 notes / 官方文档） |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：booking_sn_list: comma-separated, max 50\n\n---\n\n## 调用示例"},{"language":"text","snippet":"---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`getBookingDetail`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.get_booking_detail?module=94&type=1)\n\n**Query（必填）**：`booking_sn_list`（逗号分隔，1–50 个）\n\n**Query（可选）**：`response_optional_fields`\n\n---\n\nFile v1.0.6:references/apis/get-booking-list.md\n\n# get_booking_list\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/get_booking_list.py` |\n| Method / path | GET `api/v2/order/get_booking_list` |\n| 官方文档 | [get_booking_list](https://open.shopee.com/documents/v2/v2.order.get_booking_list?module=94&type=1) |\n| 用途 | booking_status optional: READY_TO_SHIP/PROCESSED/SHIPPED/CANCELLED/MATCHED |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `time_range_field` | — | **是** | Query 必填（见 notes / 官方文档） |\n| `page_size` | — | **是** | Query 必填（见 notes / 官方文档） |\n| `time_to` | — | **是** | Query 必填（见 notes / 官方文档） |\n| `time_from` | — | **是** | Query 必填（见 notes / 官方文档） |\n\n- Method：**GET**\n- GET：业务字段放 JSON **顶层**，runner 拼进 `queryString`（不含 `?`）\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：booking_status optional: READY_TO_SHIP/PROCESSED/SHIPPED/CANCELLED/MATCHED\n\n---\n\n## 调用示例"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: linkfox-shopee-store-orders\ndescription: Shopee（虾皮）店铺订单（与 linkfox-shopee-store-auth 同系列），经 /shopee/developerProxy 转发 Shopee Open API Order 模块全部 22 个接口：get_order_list、get_order_detail、get_shipment_list、search_package_list、cancel_order、ship 相关 booking/invoice/FBS 等。当用户提到 Shopee 订单、虾皮订单列表、订单详情、包裹、拆单、取消订单、买家取消、订单备注、booking、FBS 发票、order_sn、READY_TO_SHIP、Shopee order processing 时触发。即使未明确提及\"订单\"，只要涉及已授权 Shopee 店铺的订单查询或订单处理，也应触发。\n---\n\n# Shopee 店铺 Orders\n\nShopee Open Platform **Order 模块**（22 个 API）。**依赖 `linkfox-shopee-store-auth`** 选店；经 **`POST /shopee/developerProxy`** 传入 `shopId`（或 `merchantId`），由服务端解析 token 转发（`path` 须 `api/v2/order/...`）。\n\n## 调用方式\n\n- **API 端点**：`POST /shopee/developerProxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗算力；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<skill-name>-<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\nOrder 模块索引：[Shopee Open Platform — Order](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1)\n\n---\n\n## Prerequisites（必须先读）\n\n1. 运行 `python scripts/check_auth_dependency.py`；exit code **42** → 先安装 **`linkfox-shopee-store-auth`** 并授权店铺。\n2. **不要**在本 skill 内实现授权/令牌逻辑。\n\n---\n\n## Core Concepts\n\n- **转发链路**：`developerProxy`（`shopId`/`merchantId` 选店，服务端注入 token）→ 紫鸟 `shopee-proxy` → Shopee API（`partner_id`/`sign` 由代理自动处理）\n- **列表 → 详情**：`get_order_list` 得 `order_sn` → `get_order_detail` 拉全量字段（≤50 个/次）\n- **包裹流**：`search_package_list` / `get_package_detail` / `get_shipment_list` 用于发货前包裹视图\n- **写操作**：`split_order`、`cancel_order`、`set_note` 等为 **POST JSON body**\n- **时间窗**：`get_order_list` / `get_booking_list` 的 `time_from`/`time_to` 最大 **15 天**\n\n## 可用脚本（Order 模块 22 个 API）\n\n| 脚本 | API | Method |\n|------|-----|--------|\n| `get_order_list.py` | get_order_list | GET |\n| `get_order_detail.py` | get_order_detail | GET |\n| `get_shipment_list.py` | get_shipment_list | GET |\n| `search_package_list.py` | search_package_list | POST |\n| `get_package_detail.py` | get_package_detail | GET |\n| `split_order.py` | split_order | POST |\n| `unsplit_order.py` | unsplit_order | POST |\n| `cancel_order.py` | cancel_order | POST |\n| `handle_buyer_cancellation.py` | handle_buyer_cancellation | POST |\n| `set_note.py` | set_note | POST |\n| `get_pending_buyer_in"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-shopee-store-orders\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1789363770473\n}"},{"path":"references/api.md","content":"# linkfox-shopee-store-orders — 参数与字段参考\r\n\r\n> 单接口入参/响应说明已拆到 **`apis/`**（按 API 一份）；本文件保留模块总览与 Feedback。\r\nShopee **Order 模块**全部 22 个 API，经 **`POST /shopee/developerProxy`** 转发。\r\n\r\n授权见 **`linkfox-shopee-store-auth`**。官方文档：[Order module](https://open.shopee.com/documents/v2/v2.order.get_order_list?module=94&type=1)\r\n\r\n## 通用约定\r\n\r\n- **Base URL**：`https://tool-gateway.linkfox.com`\r\n- **Method**：POST（网关），上游 Method 见各接口\r\n- **Auth**：Header `Authorization: <api_key>`（`LINKFOXAGENT_API_KEY`）\r\n- **流程**：`POST /shopee/storeTokens` → `POST /shopee/developerProxy`\r\n- **path**：须 `api/v2/order/...`（不含域名）\r\n- **紫鸟代理**：自动追加 `partner_id`、`timestamp`、`sign`；`access_token`/`shop_id` 由 `developerProxy` 写入\r\n\r\n**developerProxy Request**：\r\n| 参数 | 必填 | 说明 |\r\n|------|------|------|\r\n| `path` | 是 | 如 `api/v2/order/get_order_list` |\r\n| `method` | 是 | `GET` / `POST` |\r\n| `accessToken` | 是 | 店铺 token |\r\n| `shopId` / `merchantId` | 二选一 | 转发为 `shop_id` / `merchant_id` |\r\n| `queryString` | GET 时 | 业务 query，不含 `?` |\r\n| `body` | POST 时 | JSON 字符串 |\r\n| `contentType` | 否 | 默认 `application/json` |\r\n\r\n**developerProxy Response**：\r\n```json\r\n{\"httpStatus\": 200, \"contentType\": \"application/json\", \"body\": \"{\\\"error\\\":\\\"\\\",\\\"response\\\":{...}}\"}\r\n```\r\n\r\n脚本在 `httpStatus==200` 时解析 `body` 为 `{responseKey}` / `{responseKey}Response`。\r\n\r\n---\r\n\r\n## Order 模块总览\r\n\r\n| # | API | Method | path | 脚本 | 官方文档 |\r\n|---|-----|--------|------|------|----------|\r\n| 1 | get_order_list | GET | `api/v2/order/get_order_list` | `get_order_list.py` | [apis/get-order-list.md](./apis/get-order-list.md) |\r\n| 2 | get_order_detail | GET | `api/v2/order/get_order_detail` | `get_order_detail.py` | [apis/get-order-detail.md](./apis/get-order-detail.md) |\r\n| 3 | get_shipment_list | GET | `api/v2/order/get_shipment_list` | `get_shipment_list.py` | [apis/get-shipment-list.md](./apis/get-shipment-list.md) |\r\n| 4 | search_package_list | POST | `api/v2/order/search_package_list` | `search_package_list.py` | [apis/search-package-list.md](./apis/search-package-list.md) |\r\n| 5 | get_package_detail | GET | `api/v2/order/get_package_detail` | `get_package_detail.py` | [apis/get-package-detail.md](./apis/get-package-detail.md) |\r\n| 6 | split_order | POST | `api/v2/order/split_order` | `split_order.py` | [apis/split-order.md](./apis/split-order.md) |\r\n| 7 | unsplit_order | POST | `api/v2/order/unsplit_order` | `unsplit_order.py` | [apis/unsplit-order.md](./apis/unsplit-order.md) |\r\n| 8 | cancel_order | POST | `api/v2/order/cancel_order` | `cancel_order.py` | [apis/cancel-order.md](./apis/cancel-order.md) |\r\n| 9 | handle_buyer_cancellation | POST | `api/v2/order/handle_buyer_cancellation` | `handle_buyer_cancellation.py` | [apis/handle-buyer-cancellation.md](./apis/handle-buyer-cancellation.md) |\r\n| 10 | set_note | POST | `api/v2/order/set_note` | `set_note.py` | [apis/set-note.md](./apis/set-note.md) |\r\n| 11 | get_pending_buyer_invoice_order_list | GET | `api/v2/order/get_pending_buyer_invoice_order_list` | `get_pending_buyer_invoice_order_lis"},{"path":"references/apis/cancel-order.md","content":"# cancel_order\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/cancel_order.py` |\n| Method / path | POST `api/v2/order/cancel_order` |\n| 官方文档 | [cancel_order](https://open.shopee.com/documents/v2/v2.order.cancel_order?module=94&type=1) |\n| 用途 | cancel_reason: OUT_OF_STOCK/CUSTOMER_REQUEST/UNDELIVERABLE_AREA/COD_NOT_SUPPORTED |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `order_sn` | — | 是 | 见 notes / 官方文档 |\n| `cancel_reason` | — | 是 | 见 notes / 官方文档 |\n| `item_list` | — | 否（POST body） | 见 notes / 官方文档 |\n| `partial_cancel_item_list` | — | 否（POST body） | 见 notes / 官方文档 |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：cancel_reason: OUT_OF_STOCK/CUSTOMER_REQUEST/UNDELIVERABLE_AREA/COD_NOT_SUPPORTED\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/cancel_order.py '{\"shopId\": \"67890\", \"order_sn\": \"<order_sn>\", \"cancel_reason\": \"<cancel_reason>\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"cancel_order\", \"shopId\": \"67890\", \"order_sn\": \"<order_sn>\", \"cancel_reason\": \"<cancel_reason>\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`cancelOrder`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.cancel_order?module=94&type=1)\n\n**Body（必填）**：`order_sn`、`cancel_reason`\n\n**Body（可选）**：`item_list`、`partial_cancel_item_list`（`item_id`、`model_id`、`model_quantity` 等）\n\n**cancel_reason**：`OUT_OF_STOCK`、`CUSTOMER_REQUEST`、`UNDELIVERABLE_AREA`（TW/MY）、`COD_NOT_SUPPORTED`\n\n---"},{"path":"references/apis/download-fbs-invoices.md","content":"# download_fbs_invoices\n\n| 项 | 值 |\n|----|-----|\n| 脚本 | `scripts/download_fbs_invoices.py` |\n| Method / path | POST `api/v2/order/download_fbs_invoices` |\n| 官方文档 | [download_fbs_invoices](https://open.shopee.com/documents/v2/v2.order.download_fbs_invoices?module=94&type=1) |\n| 用途 | Download link expires in 30 minutes |\n\n经 **`POST /shopee/developerProxy`** 转发；依赖 **`linkfox-shopee-store-auth`** 选店（通常传 `shopId` 或 `merchantId`）。\n\n---\n\n## 脚本 JSON 入参\n\n| 字段 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `shopId` | string | 与 `merchantId` 二选一 | 店铺 ID（推荐；Public 等无店铺接口可省略） |\n| `merchantId` | string | 与 `shopId` 二选一 | 商户 ID |\n| `request_id_list` | — | 否（POST body） | 见 notes / 官方文档 |\n| `request_id_list` | object | 否（可嵌在 body） | 嵌套对象；或整体传 `body` / `requestBody` |\n\n- Method：**POST**\n- POST：传 `body` / `requestBody`，或把 `body_fields` 列在 JSON 顶层\n- `shopId` / `merchantId` / `skipDepCheck` 等为网关选店保留字段，不会进 Shopee query/body\n- Registry notes：Download link expires in 30 minutes\n\n---\n\n## 调用示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\n\npython scripts/download_fbs_invoices.py '{\"shopId\": \"67890\"}'\n\n# 通用入口\npython scripts/order_api.py '{\"api\": \"download_fbs_invoices\", \"shopId\": \"67890\"}'\n```\n\n---\n\n## 响应要点\n\n1. 先看 **`developerProxy.httpStatus`** / `errcode`\n2. 再读 **`downloadFbsInvoices`**（Shopee `response` 解析结果）\n3. 字段以官方文档为准\n\n---\n\n## 补充说明（自原 references/api.md）\n\n[官方文档](https://open.shopee.com/documents/v2/v2.order.download_fbs_invoices?module=94&type=1)\n\n**Body（必填）**：`request_id_list.request_id`（int 数组）\n\n**说明**：需先 `generate_fbs_invoices` → 本接口轮询结果 → 下载；链接 30 分钟过期。\n\n---"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1236,"uniquenessScore":32,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T20:42:26.890Z","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-11T20:42:26.890Z","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-12T01:02:57.151Z","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"}]}}}